GNOME Bugzilla – Bug 580917
Alt-Tab handling cleanup and new abstraction
Last modified: 2009-05-04 14:26:45 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...
Created attachment 133667 [details] [review] Remove some old compositor-related code that mutter doesn't need
Created attachment 133668 [details] [review] Fix some broken indentation and simplify nested if()s
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.
Created attachment 133670 [details] [review] Split screen->tab_popup and screen->ws_popup
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.
Created attachment 133672 [details] [review] Create a MetaAltTabHandler abstraction to allow alternate implementations
Created attachment 133673 [details] [review] a diff -w version of the indentation patch (133668)
committed