GNOME Bugzilla – Bug 686928
Show desktop changes focused windows
Last modified: 2013-01-31 18:39:03 UTC
I am using ubuntu gnome 12.10 with ricotz ppa enabled (gnome shell 3.7.1). No extensions etc. When I do show desktop (win+D), and press it again to get back my windows the current focused window changes to the second last accessed one. Then if I repeat win+D twice, I get my original window again. It cycles between the current and last window. I guess there is some calculation mistake where instead of the current/first we are accessing the second window, when unhiding the windows.
Created attachment 227356 [details] [review] window: Avoid spurious focus-window changes when showing desktop When using the show-desktop shortcut with no desktop window, unshowing will focus the second-most-recently-used window. If we find a desktop window, it will be focused explicitly and everything works as expected; however without a desktop window, we end up hiding the focus window, which will use focus_default_window() with the not_this_one parameter to move focus away. We used to get away with this, as the not_this_one parameter was ignored until commit e257580b9484, now with bug 675982 fixed, we need to explicitly handle the show-desktop case.
Review of attachment 227356 [details] [review]: Aha. OK.
Attachment 227356 [details] pushed as 2cc0d31 - window: Avoid spurious focus-window changes when showing desktop
*** Bug 692958 has been marked as a duplicate of this bug. ***