After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 695395 - Ctrl+Alt+Tab does not work in classic mode
Ctrl+Alt+Tab does not work in classic mode
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-03-07 20:10 UTC by Debarshi Ray
Modified: 2013-03-13 09:49 UTC
See Also:
GNOME target: 3.8
GNOME version: ---


Attachments
ctrlAltTab: Make it work in classic mode (1.80 KB, patch)
2013-03-07 21:10 UTC, Debarshi Ray
reviewed Details | Review
ctrlAltTab: Fix external DOCK windows (1.16 KB, patch)
2013-03-08 13:32 UTC, Florian Müllner
none Details | Review
ctrlAltTab: Fix external DOCK windows (1.40 KB, patch)
2013-03-08 14:51 UTC, Florian Müllner
committed Details | Review

Description Debarshi Ray 2013-03-07 20:10:32 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
Comment 1 Debarshi Ray 2013-03-07 20:23:34 UTC
Disabling the window-list fixes it.
Comment 2 Debarshi Ray 2013-03-07 20:57:00 UTC
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).
Comment 3 Debarshi Ray 2013-03-07 21:10:24 UTC
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.
Comment 4 Giovanni Campagna 2013-03-07 21:56:00 UTC
Review of attachment 238341 [details] [review]:

Shouldn't it really be proxy: window.get_compositor_private() when adding the items?
Comment 5 Florian Müllner 2013-03-08 13:32:32 UTC
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)
Comment 6 Debarshi Ray 2013-03-08 13:43:30 UTC
(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?
Comment 7 Florian Müllner 2013-03-08 14:51:59 UTC
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 ...)
Comment 8 Matthias Clasen 2013-03-12 11:04:02 UTC
lets fix this for 3.8
Comment 9 Jasper St. Pierre (not reading bugmail) 2013-03-13 01:56:39 UTC
Review of attachment 238373 [details] [review]:

Yikes, I'm sorry.
Comment 10 Florian Müllner 2013-03-13 09:49:06 UTC
Attachment 238373 [details] pushed as a32f27a - ctrlAltTab: Fix external DOCK windows