From 95e5a13131e5e9ad8232a97707e42ec058a690d3 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 20 Oct 2002 15:22:40 +0000 Subject: [PATCH] check above->mapped before deciding if it overlaps the window being 2002-10-20 Havoc Pennington * src/keybindings.c (handle_raise_or_lower): check above->mapped before deciding if it overlaps the window being raiselowered, fix from Stephane Chauveau --- ChangeLog | 6 ++++++ src/keybindings.c | 21 ++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76ef978f0..fca4dcb41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-10-20 Havoc Pennington + + * src/keybindings.c (handle_raise_or_lower): check above->mapped + before deciding if it overlaps the window being raiselowered, + fix from Stephane Chauveau + 2002-10-19 Jeremy Katz * configure.in: make Xrandr check less noisy diff --git a/src/keybindings.c b/src/keybindings.c index badc1520a..6b08296ed 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -2711,15 +2711,18 @@ handle_raise_or_lower (MetaDisplay *display, { MetaRectangle tmp, win_rect, above_rect; - meta_window_get_outer_rect (window, &win_rect); - meta_window_get_outer_rect (above, &above_rect); - - /* Check if obscured */ - if (meta_rectangle_intersect (&win_rect, &above_rect, &tmp)) - { - meta_window_raise (window); - return; - } + if (above->mapped) + { + meta_window_get_outer_rect (window, &win_rect); + meta_window_get_outer_rect (above, &above_rect); + + /* Check if obscured */ + if (meta_rectangle_intersect (&win_rect, &above_rect, &tmp)) + { + meta_window_raise (window); + return; + } + } above = meta_stack_get_above (window->screen->stack, above, TRUE); }