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.

http://bugzilla.gnome.org/show_bug.cgi?id=580917
This commit is contained in:
Dan Winship
2009-04-27 10:01:30 -04:00
parent f55509aadd
commit cbf4be04fc
4 changed files with 32 additions and 48 deletions

View File

@@ -3074,6 +3074,10 @@ do_choose_window (MetaDisplay *display,
return;
}
meta_screen_ensure_tab_popup (screen, type,
show_popup ? META_TAB_SHOW_ICON :
META_TAB_SHOW_INSTANTLY);
meta_ui_tab_popup_select (screen->tab_popup,
(MetaTabEntryKey) initial_selection->xwindow);
@@ -3455,6 +3459,7 @@ handle_workspace_switch (MetaDisplay *display,
if (grabbed_before_release && !meta_prefs_get_no_tab_popup ())
{
meta_screen_ensure_workspace_popup (screen);
meta_ui_tab_popup_select (screen->tab_popup, (MetaTabEntryKey) next);
/* only after selecting proper space */