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:
@@ -1533,6 +1533,16 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
|
||||
/* don't show tab popup, since proper window isn't selected yet */
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_destroy_tab_popup (MetaScreen *screen)
|
||||
{
|
||||
if (screen->tab_popup)
|
||||
{
|
||||
meta_ui_tab_popup_free (screen->tab_popup);
|
||||
screen->tab_popup = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_ensure_workspace_popup (MetaScreen *screen)
|
||||
{
|
||||
@@ -1601,6 +1611,16 @@ meta_screen_ensure_workspace_popup (MetaScreen *screen)
|
||||
/* don't show tab popup, since proper space isn't selected yet */
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_destroy_workspace_popup (MetaScreen *screen)
|
||||
{
|
||||
if (screen->tab_popup)
|
||||
{
|
||||
meta_ui_tab_popup_free (screen->tab_popup);
|
||||
screen->tab_popup = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
MetaWindow*
|
||||
meta_screen_get_mouse_window (MetaScreen *screen,
|
||||
MetaWindow *not_this_one)
|
||||
|
Reference in New Issue
Block a user