1
0
Fork 0

Make it so that the alt-tabbing won't try to go to a minimized window by

2003-03-13  Rob Adams <robadams@ucla.edu>

        Make it so that the alt-tabbing won't try to go to a minimized
	window by default.  Fix for #107071.

	* display.c (meta_display_get_tab_list): use a GList instead of a
	GSList
	(meta_display_get_tab_next): use meta_display_get_tab_list to
	decide what the next/previous tab window should be.

	* display.h (meta_display_get_tab_list): update function prototype
	to return GList instead of GSList.

	* screen.c (meta_screen_ensure_tab_popup): update function to deal
	with GList returned by meta_display_get_tab_list instead of GSList.
This commit is contained in:
Rob Adams 2003-03-15 02:16:21 +00:00 committed by Rob Adams
parent cc7493cac9
commit 67cbbeb6c1
3 changed files with 28 additions and 20 deletions

View file

@ -3381,7 +3381,7 @@ find_tab_forward (MetaDisplay *display,
MetaTabList type, MetaTabList type,
MetaScreen *screen, MetaScreen *screen,
MetaWorkspace *workspace, MetaWorkspace *workspace,
GList *start) GList *start)
{ {
GList *tmp; GList *tmp;
@ -3458,13 +3458,13 @@ find_tab_backward (MetaDisplay *display,
return NULL; return NULL;
} }
GSList* GList*
meta_display_get_tab_list (MetaDisplay *display, meta_display_get_tab_list (MetaDisplay *display,
MetaTabList type, MetaTabList type,
MetaScreen *screen, MetaScreen *screen,
MetaWorkspace *workspace) MetaWorkspace *workspace)
{ {
GSList *tab_list; GList *tab_list;
/* workspace can be NULL for all workspaces */ /* workspace can be NULL for all workspaces */
@ -3485,7 +3485,7 @@ meta_display_get_tab_list (MetaDisplay *display,
IN_TAB_CHAIN (window, type) && IN_TAB_CHAIN (window, type) &&
(workspace == NULL || (workspace == NULL ||
meta_window_visible_on_workspace (window, workspace))) meta_window_visible_on_workspace (window, workspace)))
tab_list = g_slist_prepend (tab_list, window); tab_list = g_list_prepend (tab_list, window);
tmp = tmp->next; tmp = tmp->next;
} }
@ -3504,13 +3504,13 @@ meta_display_get_tab_list (MetaDisplay *display,
IN_TAB_CHAIN (window, type) && IN_TAB_CHAIN (window, type) &&
(workspace == NULL || (workspace == NULL ||
meta_window_visible_on_workspace (window, workspace))) meta_window_visible_on_workspace (window, workspace)))
tab_list = g_slist_prepend (tab_list, window); tab_list = g_list_prepend (tab_list, window);
tmp = tmp->next; tmp = tmp->next;
} }
} }
tab_list = g_slist_reverse (tab_list); tab_list = g_list_reverse (tab_list);
return tab_list; return tab_list;
} }
@ -3518,12 +3518,18 @@ meta_display_get_tab_list (MetaDisplay *display,
MetaWindow* MetaWindow*
meta_display_get_tab_next (MetaDisplay *display, meta_display_get_tab_next (MetaDisplay *display,
MetaTabList type, MetaTabList type,
MetaScreen *screen, MetaScreen *screen,
MetaWorkspace *workspace, MetaWorkspace *workspace,
MetaWindow *window, MetaWindow *window,
gboolean backward) gboolean backward)
{ {
if (display->mru_list == NULL) GList *tab_list;
tab_list = meta_display_get_tab_list(display,
type,
screen,
workspace);
if (tab_list == NULL)
return NULL; return NULL;
if (window != NULL) if (window != NULL)
@ -3532,20 +3538,22 @@ meta_display_get_tab_next (MetaDisplay *display,
if (backward) if (backward)
return find_tab_backward (display, type, screen, workspace, return find_tab_backward (display, type, screen, workspace,
g_list_find (display->mru_list, g_list_find (tab_list,
window)); window));
else else
return find_tab_forward (display, type, screen, workspace, return find_tab_forward (display, type, screen, workspace,
g_list_find (display->mru_list, g_list_find (tab_list,
window)); window));
} }
if (backward) if (backward)
return find_tab_backward (display, type, screen, workspace, return find_tab_backward (display, type, screen, workspace,
display->mru_list); tab_list);
else else
return find_tab_forward (display, type, screen, workspace, return find_tab_forward (display, type, screen, workspace,
display->mru_list); tab_list);
g_list_free (tab_list);
} }
MetaWindow* MetaWindow*

View file

@ -410,10 +410,10 @@ typedef enum
} MetaTabList; } MetaTabList;
GSList* meta_display_get_tab_list (MetaDisplay *display, GList* meta_display_get_tab_list (MetaDisplay *display,
MetaTabList type, MetaTabList type,
MetaScreen *screen, MetaScreen *screen,
MetaWorkspace *workspace); MetaWorkspace *workspace);
MetaWindow* meta_display_get_tab_next (MetaDisplay *display, MetaWindow* meta_display_get_tab_next (MetaDisplay *display,
MetaTabList type, MetaTabList type,

View file

@ -1053,8 +1053,8 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
MetaTabList type) MetaTabList type)
{ {
MetaTabEntry *entries; MetaTabEntry *entries;
GSList *tab_list; GList *tab_list;
GSList *tmp; GList *tmp;
int len; int len;
int i; int i;
@ -1066,7 +1066,7 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
screen, screen,
screen->active_workspace); screen->active_workspace);
len = g_slist_length (tab_list); len = g_list_length (tab_list);
entries = g_new (MetaTabEntry, len + 1); entries = g_new (MetaTabEntry, len + 1);
entries[len].key = NULL; entries[len].key = NULL;
@ -1133,7 +1133,7 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
TRUE); TRUE);
g_free (entries); g_free (entries);
g_slist_free (tab_list); g_list_free (tab_list);
/* don't show tab popup, since proper window isn't selected yet */ /* don't show tab popup, since proper window isn't selected yet */
} }