From 8ceb613668e86537de97fbb8d6f4b7e5883f73f1 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Mon, 13 Feb 2006 19:26:40 +0000 Subject: [PATCH] We had that prev_window code in multiple places and it was all identical. 2006-02-13 Elijah Newren * 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. --- ChangeLog | 17 ++++++++++++----- src/keybindings.c | 27 ++++----------------------- 2 files changed, 16 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c227116a..0e9053370 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,17 @@ -2006-02-13 Thomas Thurman +2006-02-13 Elijah Newren + + * 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 * src/keybindings.c (process_tab_grab): Allow alt-escape to cancel alt-tabbing, and vice versa. Fixes #141425. -2006-02-11 Thomas Thurman +2006-02-11 Thomas Thurman Disable alt-f7 if a window can't be moved, and alt-f8 if it can't be resized. Fixes #328920. @@ -32,7 +39,7 @@ * src/window.c (enum GnomeWinLayer): remove this legacy cruft that we stopped using years ago -2006-02-10 Thomas Thurman +2006-02-10 Thomas Thurman Avoid a memory leak when checking which workspace(s) a window is on. Fixes #322059. @@ -45,7 +52,7 @@ window->workspace->list_containing_self instead of allocating (and leaking) such a list on the fly. -2006-02-09 Thomas Thurman +2006-02-09 Thomas Thurman * src/testboxes.c (test_regions_okay, test_clamping_to_region): add messages to explain that warnings are harmless @@ -59,7 +66,7 @@ Mon Feb 6 17:45:39 2006 Søren Sandmann * src/compositor.c: New fancy minimize animation. Fade windows in and out. -2006-02-03 Thomas Thurman +2006-02-03 Thomas Thurman * src/display.c (event_callback): produce warning when invalid events with no timestamp are received, rather than failing an diff --git a/src/keybindings.c b/src/keybindings.c index 67e65d242..541b18676 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -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);