GNOME Bugzilla – Bug 667552
Switching between applications (Alt-tab) bug with a modal window
Last modified: 2013-05-29 23:44:18 UTC
- Open a Terminal - Open Firefox - Go to menu File > Save page as… : it opens a modal window - Let this modal window open and press Alt-tab : the Terminal has the focus - Alt-tab again : Firefox (and its modal window) has the focus - [Alt-tab again : **BUG** it stays always on Firefox In the application list of alt-tab menu, Firefox is at the second position, instead of first. So when you alt-tab, you go to the second position, which is… Firefox.
re-assigning to gnome-shell.
rom: Is this about 3.2?
I think yes. I use Debian sid, and Terminal is 3.2.1, Evolution is 3.2.2, eog is 3.2.2, Nautilus is 3.2.1, gedit is 3.2.6… How to know the gnome-shell version ?
Confirmed on Fedora 16 too. It works even with several windows instead of the terminal, but the bug isn't always the same. If you play with it for some time, you'll end up with Firefox being the second or third app in Alt+Tab (with 3 windows); the common fact is that the order isn't updated when switching to Firefox.
The problem lies in the fact that app ordering in the alt-tab popup is obtained looking only at "normal" windows, so that interactions with a skip-taskbar window are not taken into account: [...] let windows = display.get_tab_list(Meta.TabList.NORMAL, screen, screen.get_active_workspace()); [...] (in altTab.js#143) A possible fix, implemented in next patches, is introducing in Mutter a new value META_TAB_LIST_NORMAL_ALL in MetaTabList enum, corresponding to all windows for which META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE(window) is true (thus including skip-taskbar). Another solution could be changing the last-used timestamp for the parent window when interacting with the modal dialog, but I don't think it's a good idea.
Created attachment 209548 [details] [review] altTab: take into account all windows when computing app icon ordering
Created attachment 209549 [details] [review] Add META_TAB_LIST_NORMAL_ALL to MetaTabList enum This is a new value, not associated with any keybindings, useful when the WM needs to order the applications by last-interaction, taking into account all windows. -- Mutter patch
(In reply to comment #5) > The problem lies in the fact that app ordering in the alt-tab popup is obtained > looking only at "normal" windows, so that interactions with a skip-taskbar > window are not taken into account: > > [...] > let windows = display.get_tab_list(Meta.TabList.NORMAL, screen, > screen.get_active_workspace()); > [...] > (in altTab.js#143) > The correct fix IMO is to move app tracking into mutter (or into a library that mutter uses), but this is fine for now.
Review of attachment 209548 [details] [review]: I forgot to mark this ACN.
Review of attachment 209549 [details] [review]: ::: src/core/keybindings.c @@ +3027,3 @@ return META_GRAB_OP_KEYBOARD_TABBING_GROUP; + case META_TAB_LIST_NORMAL_ALL: + /* This is actually never reached and it's here Use g_assert_not_reached(), then. ::: src/meta/display.h @@ +35,3 @@ META_TAB_LIST_DOCKS, + META_TAB_LIST_GROUP, + META_TAB_LIST_NORMAL_ALL, No comma.
Created attachment 210045 [details] [review] Add META_TAB_LIST_NORMAL_ALL to MetaTabList enum This is a new value, not associated with any keybindings, useful when the WM needs to order the applications by last-interaction, taking into account all windows.
Review of attachment 210045 [details] [review]: ::: src/core/keybindings.c @@ +3024,3 @@ + just to silence a compiler warning */ + g_assert_not_reached (); + return META_GRAB_OP_NONE; I was thinking something more of the lines of: default: break; and letting the g_assert_not_reached(); below handle it.
(In reply to comment #12) > Review of attachment 210045 [details] [review]: > > ::: src/core/keybindings.c > @@ +3024,3 @@ > + just to silence a compiler warning */ > + g_assert_not_reached (); > + return META_GRAB_OP_NONE; > > I was thinking something more of the lines of: > > default: > break; > > and letting the g_assert_not_reached(); below handle it. yeah, sorry for sloppiness, I replied almost blindly here
Created attachment 210051 [details] [review] Add META_TAB_LIST_NORMAL_ALL to MetaTabList enum This is a new value, not associated with any keybindings, useful when the WM needs to order the applications by last-interaction, taking into account all windows.
Review of attachment 210051 [details] [review]: Yes.
Comment on attachment 209548 [details] [review] altTab: take into account all windows when computing app icon ordering Attachment 209548 [details] pushed as 066d446 - altTab: take into account all windows when computing app icon ordering
Comment on attachment 210051 [details] [review] Add META_TAB_LIST_NORMAL_ALL to MetaTabList enum Attachment 210051 [details] pushed as 8fb361c - Add META_TAB_LIST_NORMAL_ALL to MetaTabList enum
Oops, we forgot to close this when the patches were committed