check above->mapped before deciding if it overlaps the window being

2002-10-20  Havoc Pennington  <hp@pobox.com>

	* src/keybindings.c (handle_raise_or_lower): check above->mapped
	before deciding if it overlaps the window being raiselowered,
	fix from Stephane Chauveau
This commit is contained in:
Havoc Pennington 2002-10-20 15:22:40 +00:00 committed by Havoc Pennington
parent c1a88f5457
commit 95e5a13131
2 changed files with 18 additions and 9 deletions

View File

@ -1,3 +1,9 @@
2002-10-20 Havoc Pennington <hp@pobox.com>
* 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 <katzj@redhat.com>
* configure.in: make Xrandr check less noisy

View File

@ -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);
}