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

View File

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

View File

@ -1053,8 +1053,8 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
MetaTabList type)
{
MetaTabEntry *entries;
GSList *tab_list;
GSList *tmp;
GList *tab_list;
GList *tmp;
int len;
int i;
@ -1066,7 +1066,7 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
screen,
screen->active_workspace);
len = g_slist_length (tab_list);
len = g_list_length (tab_list);
entries = g_new (MetaTabEntry, len + 1);
entries[len].key = NULL;
@ -1133,7 +1133,7 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
TRUE);
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 */
}