mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
Patch from Ross Cohen to make alt-esc (show windows instantly) actually
2005-10-03 Elijah Newren <newren@gmail.com> Patch from Ross Cohen to make alt-esc (show windows instantly) actually show minimized windows too. Fixes #107072. * src/keybindings.c (process_tab_grab): initialize tab_unminimized to FALSE for the target window when starting the grab, when advancing through the list check to find the previous window and re-minimize it if it was tab-unminimized, unminimize the new window we're alt-esc'ing to if it's minimized, (do_choose_window): raise and unminimize the initial window as well in alt-esc'ing * src/window.h (struct _MetaWindow): add a tab_unminimized field * src/window.c (meta_window_new_with_attrs): initialize tab_unminimized to false
This commit is contained in:
parent
1a8c2aa027
commit
12daca5cb1
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
||||
2005-10-03 Elijah Newren <newren@gmail.com>
|
||||
|
||||
Patch from Ross Cohen to make alt-esc (show windows instantly)
|
||||
actually show minimized windows too. Fixes #107072.
|
||||
|
||||
* src/keybindings.c (process_tab_grab): initialize tab_unminimized
|
||||
to FALSE for the target window when starting the grab, when
|
||||
advancing through the list check to find the previous window and
|
||||
re-minimize it if it was tab-unminimized, unminimize the new
|
||||
window we're alt-esc'ing to if it's minimized, (do_choose_window):
|
||||
raise and unminimize the initial window as well in alt-esc'ing
|
||||
|
||||
* src/window.h (struct _MetaWindow): add a tab_unminimized field
|
||||
|
||||
* src/window.c (meta_window_new_with_attrs): initialize
|
||||
tab_unminimized to false
|
||||
|
||||
2005-10-03 Elijah Newren <newren@gmail.com>
|
||||
|
||||
Branched for Gnome 2.13. :-)
|
||||
|
@ -2434,6 +2434,8 @@ process_tab_grab (MetaDisplay *display,
|
||||
|
||||
if (target_window)
|
||||
{
|
||||
target_window->tab_unminimized = FALSE;
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Activating target window\n");
|
||||
|
||||
@ -2501,6 +2503,13 @@ process_tab_grab (MetaDisplay *display,
|
||||
|
||||
if (key_used)
|
||||
{
|
||||
Window prev_xwindow;
|
||||
MetaWindow *prev_window;
|
||||
prev_xwindow =
|
||||
(Window) meta_ui_tab_popup_get_selected (screen->tab_popup);
|
||||
prev_window =
|
||||
meta_display_lookup_x_window (display, prev_xwindow);
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Key pressed, moving tab focus in popup\n");
|
||||
|
||||
@ -2525,14 +2534,25 @@ process_tab_grab (MetaDisplay *display,
|
||||
target_window =
|
||||
meta_display_lookup_x_window (display, target_xwindow);
|
||||
|
||||
if (prev_window && prev_window->tab_unminimized)
|
||||
{
|
||||
prev_window->tab_unminimized = FALSE;
|
||||
meta_window_minimize (prev_window);
|
||||
}
|
||||
|
||||
if (target_window)
|
||||
{
|
||||
meta_window_raise (target_window);
|
||||
target_window->tab_unminimized = target_window->minimized;
|
||||
meta_window_unminimize (target_window);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Window prev_xwindow;
|
||||
MetaWindow *prev_window;
|
||||
|
||||
/* end grab */
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Ending tabbing/cycling, uninteresting key pressed\n");
|
||||
@ -2541,6 +2561,17 @@ process_tab_grab (MetaDisplay *display,
|
||||
"Syncing to old stack positions.\n");
|
||||
meta_stack_set_positions (screen->stack,
|
||||
screen->display->grab_old_window_stacking);
|
||||
|
||||
prev_xwindow =
|
||||
(Window) meta_ui_tab_popup_get_selected (screen->tab_popup);
|
||||
prev_window =
|
||||
meta_display_lookup_x_window (display, prev_xwindow);
|
||||
|
||||
if (prev_window && prev_window->tab_unminimized)
|
||||
{
|
||||
meta_window_minimize (prev_window);
|
||||
prev_window->tab_unminimized = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return key_used;
|
||||
@ -3099,7 +3130,12 @@ do_choose_window (MetaDisplay *display,
|
||||
meta_ui_tab_popup_set_showing (screen->tab_popup,
|
||||
TRUE);
|
||||
else
|
||||
{
|
||||
meta_window_raise (initial_selection);
|
||||
initial_selection->tab_unminimized =
|
||||
initial_selection->minimized;
|
||||
meta_window_unminimize (initial_selection);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -437,6 +437,7 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
||||
window->shaded = FALSE;
|
||||
window->initially_iconic = FALSE;
|
||||
window->minimized = FALSE;
|
||||
window->tab_unminimized = FALSE;
|
||||
window->iconic = FALSE;
|
||||
window->mapped = attrs->map_state != IsUnmapped;
|
||||
/* if already mapped, no need to worry about focus-on-first-time-showing */
|
||||
|
@ -124,6 +124,7 @@ struct _MetaWindow
|
||||
|
||||
/* Minimize is the state controlled by the minimize button */
|
||||
guint minimized : 1;
|
||||
guint tab_unminimized : 1;
|
||||
|
||||
/* Whether the window is mapped; actual server-side state
|
||||
* see also unmaps_pending
|
||||
|
Loading…
Reference in New Issue
Block a user