We had that prev_window code in multiple places and it was all identical.
2006-02-13 Elijah Newren <newren gmail com> * src/keybindings.c (process_tab_grab): We had that prev_window code in multiple places and it was all identical. Let's just stick it in one place to make the function easier to read.
This commit is contained in:
parent
500bbefc6a
commit
8ceb613668
@ -1,3 +1,10 @@
|
||||
2006-02-13 Elijah Newren <newren gmail com>
|
||||
|
||||
* src/keybindings.c (process_tab_grab):
|
||||
We had that prev_window code in multiple places and it was all
|
||||
identical. Let's just stick it in one place to make the function
|
||||
easier to read.
|
||||
|
||||
2006-02-13 Thomas Thurman <thomas thurman org uk>
|
||||
|
||||
* src/keybindings.c (process_tab_grab):
|
||||
|
@ -2261,6 +2261,8 @@ process_tab_grab (MetaDisplay *display,
|
||||
gboolean popup_not_showing;
|
||||
gboolean backward;
|
||||
gboolean key_used;
|
||||
Window prev_xwindow;
|
||||
MetaWindow *prev_window;
|
||||
|
||||
if (screen != display->grab_screen)
|
||||
return FALSE;
|
||||
@ -2313,6 +2315,8 @@ process_tab_grab (MetaDisplay *display,
|
||||
if (is_modifier (display, event->xkey.keycode))
|
||||
return TRUE;
|
||||
|
||||
prev_xwindow = (Window) meta_ui_tab_popup_get_selected (screen->tab_popup);
|
||||
prev_window = meta_display_lookup_x_window (display, prev_xwindow);
|
||||
action = display_get_keybinding_action (display,
|
||||
keysym,
|
||||
display->grab_mask);
|
||||
@ -2348,16 +2352,8 @@ process_tab_grab (MetaDisplay *display,
|
||||
/* Also, we must re-lower and re-minimize whatever window
|
||||
* we'd previously raised and unminimized.
|
||||
*/
|
||||
Window prev_xwindow;
|
||||
MetaWindow *prev_window;
|
||||
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);
|
||||
@ -2402,13 +2398,6 @@ 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");
|
||||
|
||||
@ -2452,9 +2441,6 @@ process_tab_grab (MetaDisplay *display,
|
||||
}
|
||||
else
|
||||
{
|
||||
Window prev_xwindow;
|
||||
MetaWindow *prev_window;
|
||||
|
||||
/* end grab */
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Ending tabbing/cycling, uninteresting key pressed\n");
|
||||
@ -2464,11 +2450,6 @@ process_tab_grab (MetaDisplay *display,
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user