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 580917 - Alt-Tab handling cleanup and new abstraction
Alt-Tab handling cleanup and new abstraction
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2009-04-30 17:09 UTC by Dan Winship
Modified: 2009-05-04 14:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove some old compositor-related code that mutter doesn't need (3.54 KB, patch)
2009-04-30 17:14 UTC, Dan Winship
none Details | Review
Fix some broken indentation and simplify nested if()s (9.15 KB, patch)
2009-04-30 17:15 UTC, Dan Winship
none Details | Review
Reorganize tab popup code a bit more cleanly. (6.23 KB, patch)
2009-04-30 17:15 UTC, Dan Winship
none Details | Review
Split screen->tab_popup and screen->ws_popup (5.13 KB, patch)
2009-04-30 17:15 UTC, Dan Winship
none Details | Review
Push the tab/workspace popup abstraction completely into screen.c (12.36 KB, patch)
2009-04-30 17:15 UTC, Dan Winship
none Details | Review
Create a MetaAltTabHandler abstraction to allow alternate implementations (28.85 KB, patch)
2009-04-30 17:15 UTC, Dan Winship
none Details | Review
a diff -w version of the indentation patch (133668) (4.43 KB, patch)
2009-04-30 17:16 UTC, Dan Winship
none Details | Review

Description Dan Winship 2009-04-30 17:09:25 UTC
In gnome-shell we want to reimplement the Alt-Tab behavior... the existing keybinding plug-in-ability doesn't work for us because we want do to the whole Alt-Tab "mode" thing, with the grab and (optionally) the pop-up window and all that.

Attaching a bunch of patches. The first ones just clean up and reorganize the existing code, and the last adds a new interface that plugins can implement to override the default Alt-Tab handler.

Owen already reviewed most of this code on bug 578847. Relative to the patches there, I've made the changes he suggested.

I'm not totally sure if the no_tab_popup stuff should be reorganized along with this. Also, these patches add a FIXME? comment to keybindings.c:do_choose_window, where it appears that the no_tab_popup case is bailing out without ever changing the window selection...
Comment 1 Dan Winship 2009-04-30 17:14:41 UTC
Created attachment 133667 [details] [review]
Remove some old compositor-related code that mutter doesn't need
Comment 2 Dan Winship 2009-04-30 17:15:24 UTC
Created attachment 133668 [details] [review]
Fix some broken indentation and simplify nested if()s
Comment 3 Dan Winship 2009-04-30 17:15:28 UTC
Created attachment 133669 [details] [review]
Reorganize tab popup code a bit more cleanly.

Rather than trying to reverse-engineer what kind of tab/workspace
popup to create from within meta_display_begin_grab_op(), just create
the popup directly from do_choose_window()/handle_workspace_switch()
after completing the grab, since they already know which kind they
want.

Also add meta_screen_destroy_tab_popup()/_destroy_workspace_popup()
rather than having meta_display_end_grab_op() poke into MetaScreen's
internals itself.
Comment 4 Dan Winship 2009-04-30 17:15:31 UTC
Created attachment 133670 [details] [review]
Split screen->tab_popup and screen->ws_popup
Comment 5 Dan Winship 2009-04-30 17:15:33 UTC
Created attachment 133671 [details] [review]
Push the tab/workspace popup abstraction completely into screen.c

Also, use MetaWindows as the tab_popup keys rather than using (X) Windows
and then having to map back and forth everywhere, which is silly since
we never actually want the X Window.
Comment 6 Dan Winship 2009-04-30 17:15:37 UTC
Created attachment 133672 [details] [review]
Create a MetaAltTabHandler abstraction to allow alternate implementations
Comment 7 Dan Winship 2009-04-30 17:16:46 UTC
Created attachment 133673 [details] [review]
a diff -w version of the indentation patch (133668)
Comment 8 Dan Winship 2009-05-04 14:26:45 UTC
committed