mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
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:
parent
6d77251c71
commit
8b26849517
12
ChangeLog
12
ChangeLog
@ -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>
|
2004-10-22 Elijah Newren <newren@math.utah.edu>
|
||||||
|
|
||||||
Update _NET_WM_STATE_HIDDEN so the pager on the panel will know
|
Update _NET_WM_STATE_HIDDEN so the pager on the panel will know
|
||||||
|
@ -3929,14 +3929,18 @@ find_tab_forward (MetaDisplay *display,
|
|||||||
MetaTabList type,
|
MetaTabList type,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWorkspace *workspace,
|
MetaWorkspace *workspace,
|
||||||
GList *start)
|
GList *start,
|
||||||
|
gboolean skip_first)
|
||||||
{
|
{
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
|
|
||||||
g_return_val_if_fail (start != NULL, NULL);
|
g_return_val_if_fail (start != NULL, NULL);
|
||||||
g_return_val_if_fail (workspace != NULL, NULL);
|
g_return_val_if_fail (workspace != NULL, NULL);
|
||||||
|
|
||||||
tmp = start->next;
|
tmp = start;
|
||||||
|
if (skip_first)
|
||||||
|
tmp = tmp->next;
|
||||||
|
|
||||||
while (tmp != NULL)
|
while (tmp != NULL)
|
||||||
{
|
{
|
||||||
MetaWindow *window = tmp->data;
|
MetaWindow *window = tmp->data;
|
||||||
@ -3967,14 +3971,17 @@ find_tab_backward (MetaDisplay *display,
|
|||||||
MetaTabList type,
|
MetaTabList type,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
MetaWorkspace *workspace,
|
MetaWorkspace *workspace,
|
||||||
GList *start)
|
GList *start,
|
||||||
|
gboolean skip_last)
|
||||||
{
|
{
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
|
|
||||||
g_return_val_if_fail (start != NULL, NULL);
|
g_return_val_if_fail (start != NULL, NULL);
|
||||||
g_return_val_if_fail (workspace != NULL, NULL);
|
g_return_val_if_fail (workspace != NULL, NULL);
|
||||||
|
|
||||||
tmp = start->prev;
|
tmp = start;
|
||||||
|
if (skip_last)
|
||||||
|
tmp = tmp->prev;
|
||||||
while (tmp != NULL)
|
while (tmp != NULL)
|
||||||
{
|
{
|
||||||
MetaWindow *window = tmp->data;
|
MetaWindow *window = tmp->data;
|
||||||
@ -4061,6 +4068,7 @@ meta_display_get_tab_next (MetaDisplay *display,
|
|||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
gboolean backward)
|
gboolean backward)
|
||||||
{
|
{
|
||||||
|
gboolean skip;
|
||||||
GList *tab_list;
|
GList *tab_list;
|
||||||
tab_list = meta_display_get_tab_list(display,
|
tab_list = meta_display_get_tab_list(display,
|
||||||
type,
|
type,
|
||||||
@ -4077,19 +4085,23 @@ 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 (tab_list,
|
g_list_find (tab_list,
|
||||||
window));
|
window),
|
||||||
|
TRUE);
|
||||||
else
|
else
|
||||||
return find_tab_forward (display, type, screen, workspace,
|
return find_tab_forward (display, type, screen, workspace,
|
||||||
g_list_find (tab_list,
|
g_list_find (tab_list,
|
||||||
window));
|
window),
|
||||||
|
TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
skip = display->focus_window != NULL &&
|
||||||
|
IN_TAB_CHAIN (display->focus_window, type);
|
||||||
if (backward)
|
if (backward)
|
||||||
return find_tab_backward (display, type, screen, workspace,
|
return find_tab_backward (display, type, screen, workspace,
|
||||||
tab_list);
|
tab_list, skip);
|
||||||
else
|
else
|
||||||
return find_tab_forward (display, type, screen, workspace,
|
return find_tab_forward (display, type, screen, workspace,
|
||||||
tab_list);
|
tab_list, skip);
|
||||||
|
|
||||||
g_list_free (tab_list);
|
g_list_free (tab_list);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user