Split screen->tab_popup and screen->ws_popup

http://bugzilla.gnome.org/show_bug.cgi?id=580917
This commit is contained in:
Dan Winship 2009-04-27 10:49:03 -04:00
parent cbf4be04fc
commit 7b522c0de8
3 changed files with 18 additions and 17 deletions

View File

@ -2730,7 +2730,7 @@ process_workspace_switch_grab (MetaDisplay *display,
{
MetaWorkspace *workspace;
if (screen != display->grab_screen || !screen->tab_popup)
if (screen != display->grab_screen || !screen->ws_popup)
return FALSE;
if (event->type == KeyRelease &&
@ -2740,7 +2740,7 @@ process_workspace_switch_grab (MetaDisplay *display,
MetaWorkspace *target_workspace;
target_workspace =
(MetaWorkspace *) meta_ui_tab_popup_get_selected (screen->tab_popup);
(MetaWorkspace *) meta_ui_tab_popup_get_selected (screen->ws_popup);
meta_topic (META_DEBUG_KEYBINDINGS,
"Ending workspace tab operation, primary modifier released\n");
@ -2777,7 +2777,7 @@ process_workspace_switch_grab (MetaDisplay *display,
/* select the next workspace in the tabpopup */
workspace =
(MetaWorkspace *) meta_ui_tab_popup_get_selected (screen->tab_popup);
(MetaWorkspace *) meta_ui_tab_popup_get_selected (screen->ws_popup);
if (workspace)
{
@ -2818,7 +2818,7 @@ process_workspace_switch_grab (MetaDisplay *display,
if (target_workspace)
{
meta_ui_tab_popup_select (screen->tab_popup,
meta_ui_tab_popup_select (screen->ws_popup,
(MetaTabEntryKey) target_workspace);
meta_topic (META_DEBUG_KEYBINDINGS,
"Tab key pressed, moving tab focus in popup\n");
@ -2836,7 +2836,7 @@ process_workspace_switch_grab (MetaDisplay *display,
meta_topic (META_DEBUG_KEYBINDINGS,
"Ending workspace tabbing & focusing default window; uninteresting key pressed\n");
workspace =
(MetaWorkspace *) meta_ui_tab_popup_get_selected (screen->tab_popup);
(MetaWorkspace *) meta_ui_tab_popup_get_selected (screen->ws_popup);
meta_workspace_focus_default_window (workspace, NULL, event->xkey.time);
return FALSE;
}
@ -3460,10 +3460,10 @@ 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);
meta_ui_tab_popup_select (screen->ws_popup, (MetaTabEntryKey) next);
/* only after selecting proper space */
meta_ui_tab_popup_set_showing (screen->tab_popup, TRUE);
meta_ui_tab_popup_set_showing (screen->ws_popup, TRUE);
}
}

View File

@ -80,7 +80,7 @@ struct _MetaScreen
Visual *default_xvisual;
MetaRectangle rect; /* Size of screen; rect.x & rect.y are always 0 */
MetaUI *ui;
MetaTabPopup *tab_popup;
MetaTabPopup *tab_popup, *ws_popup;
MetaWorkspace *active_workspace;

View File

@ -712,6 +712,7 @@ meta_screen_new (MetaDisplay *display,
screen->xscreen);
screen->tab_popup = NULL;
screen->ws_popup = NULL;
screen->stack = meta_stack_new (screen);
@ -1553,7 +1554,7 @@ meta_screen_ensure_workspace_popup (MetaScreen *screen)
int n_workspaces;
int current_workspace;
if (screen->tab_popup || meta_prefs_get_no_tab_popup ())
if (screen->ws_popup || meta_prefs_get_no_tab_popup ())
return;
current_workspace = meta_workspace_index (screen->active_workspace);
@ -1599,7 +1600,7 @@ meta_screen_ensure_workspace_popup (MetaScreen *screen)
++i;
}
screen->tab_popup = meta_ui_tab_popup_new (entries,
screen->ws_popup = meta_ui_tab_popup_new (entries,
screen->number,
len,
layout.cols,
@ -1614,10 +1615,10 @@ meta_screen_ensure_workspace_popup (MetaScreen *screen)
void
meta_screen_destroy_workspace_popup (MetaScreen *screen)
{
if (screen->tab_popup)
if (screen->ws_popup)
{
meta_ui_tab_popup_free (screen->tab_popup);
screen->tab_popup = NULL;
meta_ui_tab_popup_free (screen->ws_popup);
screen->ws_popup = NULL;
}
}