GNOME Bugzilla – Bug 695395
Ctrl+Alt+Tab does not work in classic mode
Last modified: 2013-03-13 09:49:11 UTC
Here is the backtrace: JS ERROR: !!! Exception was: TypeError: b.proxy is undefined JS ERROR: !!! message = '"b.proxy is undefined"' JS ERROR: !!! fileName = '"/opt/share/gnome-shell/js/ui/ctrlAltTab.js"' JS ERROR: !!! lineNumber = '82' JS ERROR: !!! stack = '"([object Object],[object Object])@/opt/share/gnome-shell/js/ui/ctrlAltTab.js:82 wrapper([object Object],[object Object])@/usr/share/gjs-1.0/lang.js:204 (32,"switch-panels",13)@/opt/share/gnome-shell/js/ui/ctrlAltTab.js:114 wrapper(32,"switch-panels",13)@/usr/share/gjs-1.0/lang.js:204 ([object GObject_Object],[object GObject_Object],null,[object GObject_Boxed])@/opt/share/gnome-shell/js/ui/windowManager.js:679 wrapper([object GObject_Object],[object GObject_Object],null,[object GObject_Boxed])@/usr/share/gjs-1.0/lang.js:204
Disabling the window-list fixes it.
The problem is caused by the "// And add the windows metacity would show in its Ctrl-Alt-Tab list" code in ctrlAltTab.js. In classic mode, where Nautilus draws the desktop, the above code adds "Desktop" to items, which does not have a proxy member. This is exposed by the addGroup call in window-list. It leaves items in such a state that while sorting window-list (a) gets compared with "Desktop" (b).
Created attachment 238341 [details] [review] ctrlAltTab: Make it work in classic mode I don't know the whole history behind the changes but this looks related to the changes in bug 689653 and bug 690312.
Review of attachment 238341 [details] [review]: Shouldn't it really be proxy: window.get_compositor_private() when adding the items?
Created attachment 238371 [details] [review] ctrlAltTab: Fix external DOCK windows We always add external DOCK windows to the ctrl-alt-tab switcher, e.g. separate dock applications or nautilus' desktop windows. Since commit 1f46a0dc26d81, all items in the switcher are expected to set a proxy parameter, but the aforementioned code was not updated accordingly. @Debarshi: thanks for tracking this down - I'm attaching a simpler fix, that doesn't revert Jasper's changes (which is not only cleaner, but also a lot safer)
(In reply to comment #5) > Created an attachment (id=238371) [details] [review] > ctrlAltTab: Fix external DOCK windows > > We always add external DOCK windows to the ctrl-alt-tab switcher, > e.g. separate dock applications or nautilus' desktop windows. > Since commit 1f46a0dc26d81, all items in the switcher are expected > to set a proxy parameter, but the aforementioned code was not > updated accordingly. > > @Debarshi: thanks for tracking this down - I'm attaching a simpler fix, that > doesn't revert Jasper's changes (which is not only cleaner, but also a lot > safer) Yes, this will make Ctrl+Alt+Tab work, but it will fail in focusGroup when select "Desktop" in the switcher because of root not being set. I am not sure what root would be here, because root should (be a St.Widget?) and have a navigate_focus method. Maybe we should teach focusGroup to skip such things?
Created attachment 238373 [details] [review] ctrlAltTab: Fix external DOCK windows In reply to comment #6) > Yes, this will make Ctrl+Alt+Tab work, but it will fail in focusGroup when > select "Desktop" in the switcher because of root not being set. Sigh. Maybe we *should* revert those changes, "dead code that is safe to remove" my ass. > Maybe we should teach focusGroup to skip such things? No. That would mean that we have items in the switcher that do nothing when activated, which is clearly wrong. Updated patch, which appears to work (though activating the desktop windows should probably hide all normal windows, but it doesn't look to me like we were doing that before either ...)
lets fix this for 3.8
Review of attachment 238373 [details] [review]: Yikes, I'm sorry.
Attachment 238373 [details] pushed as a32f27a - ctrlAltTab: Fix external DOCK windows