GNOME Bugzilla – Bug 649208
Should move to empathy-chat's workspace rather than moving the window to the current workspace
Last modified: 2012-03-23 12:00:12 UTC
the scenario 1. i am away from my computer 2. several people talk to me 3. i am back 4. click the flashing message icon in notifications the empathy window with chats is displayed on current workspace. this forces me to move the empathy again to its workspace. it would be great if empathy - switched to workspace where the chat window is - brought the chat window upfront
This annoys me a lot, because when I put all my conversation windows on a specific workspace, I'd like them to stay in that workspace and for me to be transported to that workspace when needed. Can we have an official stance on whether this is indeed a bug as reported, or a design decision?
Even if we wanted to implement the "move to the other desktop" behaviour we don't have any API allowing us to do that.
Ok so here's what happens: - notification of a message pops up - you click it - a new tab is created in the chat window and the chat window is brought to the front of the current workspace (any idea why/how?) What I'd expect is: - notification of a message pops up - you click it - a new tab is created in the chat window and the chat window grabs the focus, thus switching you from a workspace to another... or is that not how gnome shell does it with stuff like "Application FOO is ready" notifications? Or should this bug be reassigned to gnome-shell?
No, that's Empathy which is doing the desktop moving. I agree with you, I'd prefer keeping the existing chat window to its current workspace and move the view to this one. I'll see if that's possible using libwnck's API.
So, I tried implementing this by stealing some bits from libwnck (using libwnck directly isn't a good idea see http://developer.gnome.org/libwnck/stable/getting-started.html ). Moving to a specific workspace works fine but getting the current workspace of a window doesn't. _wnck_get_cardinal() fails at type != XA_CARDINAL. With WIP branch his at http://cgit.collabora.com/git/user/cassidy/empathy/log/?h=move-desktop-649208 help welcome.
Fixed thanks to to help of vuntz!
Created attachment 203153 [details] [review] add empathy_move_to_window_desktop
Created attachment 203154 [details] [review] empathy_chat_window_present_chat: move to the chat window desktop This is more coherent with Shell's 'app is ready' notication which moves the view to the app desktop rather than moving the app itself.
I quickly looked, and this looks sane. The only issue is that activating the workspace and then presenting a window is known to be non-optimal -- although I doubt this will ever get fixed. We have comments for this in libwnck: /* FIXME: THIS IS SICK AND WRONG AND BUGGY. See the end of * http://mail.gnome.org/archives/wm-spec-list/2005-July/msg00032.html * There should only be *one* activate call. */
Right, I guess we'll just have to live with it then. :)
Attachment 203153 [details] pushed as e0a0668 - add empathy_move_to_window_desktop Attachment 203154 [details] pushed as a85a11d - empathy_chat_window_present_chat: move to the chat window desktop
*** Bug 672679 has been marked as a duplicate of this bug. ***