Fix the alt-tab order--if the most recently used window is not focused,

2004-10-25  Elijah Newren  <newren@math.utah.edu>

	Fix the alt-tab order--if the most recently used window is not
	focused, start alt tabbing with that window instead of the one
	after it (fixes #156251)

	* src/display.c (find_tab_forward): add a skip_first parameter,
	(find_tab_backward): add a skip_last parameter,
	(meta_display_get_tab_next): if a beginning window wasn't given
	and the focused window isn't the tab chain, don't skip the MRU
	window
This commit is contained in:
Elijah Newren 2004-10-25 16:17:19 +00:00 committed by Elijah Newren
parent 6d77251c71
commit 8b26849517
2 changed files with 36 additions and 12 deletions

View File

@ -1,3 +1,15 @@
2004-10-25 Elijah Newren <newren@math.utah.edu>
Fix the alt-tab order--if the most recently used window is not
focused, start alt tabbing with that window instead of the one
after it (fixes #156251)
* src/display.c (find_tab_forward): add a skip_first parameter,
(find_tab_backward): add a skip_last parameter,
(meta_display_get_tab_next): if a beginning window wasn't given
and the focused window isn't the tab chain, don't skip the MRU
window
2004-10-22 Elijah Newren <newren@math.utah.edu>
Update _NET_WM_STATE_HIDDEN so the pager on the panel will know

View File

@ -3927,16 +3927,20 @@ meta_display_window_has_pending_pings (MetaDisplay *display,
static MetaWindow*
find_tab_forward (MetaDisplay *display,
MetaTabList type,
MetaScreen *screen,
MetaScreen *screen,
MetaWorkspace *workspace,
GList *start)
GList *start,
gboolean skip_first)
{
GList *tmp;
g_return_val_if_fail (start != NULL, NULL);
g_return_val_if_fail (workspace != NULL, NULL);
tmp = start->next;
tmp = start;
if (skip_first)
tmp = tmp->next;
while (tmp != NULL)
{
MetaWindow *window = tmp->data;
@ -3965,16 +3969,19 @@ find_tab_forward (MetaDisplay *display,
static MetaWindow*
find_tab_backward (MetaDisplay *display,
MetaTabList type,
MetaScreen *screen,
MetaScreen *screen,
MetaWorkspace *workspace,
GList *start)
GList *start,
gboolean skip_last)
{
GList *tmp;
g_return_val_if_fail (start != NULL, NULL);
g_return_val_if_fail (workspace != NULL, NULL);
tmp = start->prev;
tmp = start;
if (skip_last)
tmp = tmp->prev;
while (tmp != NULL)
{
MetaWindow *window = tmp->data;
@ -4061,6 +4068,7 @@ meta_display_get_tab_next (MetaDisplay *display,
MetaWindow *window,
gboolean backward)
{
gboolean skip;
GList *tab_list;
tab_list = meta_display_get_tab_list(display,
type,
@ -4077,19 +4085,23 @@ meta_display_get_tab_next (MetaDisplay *display,
if (backward)
return find_tab_backward (display, type, screen, workspace,
g_list_find (tab_list,
window));
window),
TRUE);
else
return find_tab_forward (display, type, screen, workspace,
g_list_find (tab_list,
window));
window),
TRUE);
}
skip = display->focus_window != NULL &&
IN_TAB_CHAIN (display->focus_window, type);
if (backward)
return find_tab_backward (display, type, screen, workspace,
tab_list);
tab_list, skip);
else
return find_tab_forward (display, type, screen, workspace,
tab_list);
tab_list, skip);
g_list_free (tab_list);
}