diff options
author | Elijah Newren <newren@math.utah.edu> | 2004-10-25 16:17:19 +0000 |
---|---|---|
committer | Elijah Newren <newren@src.gnome.org> | 2004-10-25 16:17:19 +0000 |
commit | 8b26849517d6c643126047c15e0bb514ce3332ae (patch) | |
tree | 5a3ee096a9402b35063133fcf285f3deb3fe65b2 | |
parent | 6d77251c717e0ac8382721091a04653195344257 (diff) | |
download | metacity-8b26849517d6c643126047c15e0bb514ce3332ae.tar.gz |
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
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | src/display.c | 36 |
2 files changed, 36 insertions, 12 deletions
@@ -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 diff --git a/src/display.c b/src/display.c index 02797acf..225d6c75 100644 --- a/src/display.c +++ b/src/display.c @@ -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); } |