frame: Make sure to offset by invisible borders when unmanaging windows

When we reparent a window to the root when we're exiting, we need to offset
the position by the invisible borders, otherwise windows will creep up and
to the left.

https://bugzilla.gnome.org/show_bug.cgi?id=660848
This commit is contained in:
Jasper St. Pierre 2011-10-17 17:18:50 -04:00
parent f700a7be07
commit 6d0c1f08d2

View File

@ -173,6 +173,7 @@ void
meta_window_destroy_frame (MetaWindow *window) meta_window_destroy_frame (MetaWindow *window)
{ {
MetaFrame *frame; MetaFrame *frame;
MetaFrameBorders borders;
if (window->frame == NULL) if (window->frame == NULL)
return; return;
@ -181,6 +182,8 @@ meta_window_destroy_frame (MetaWindow *window)
frame = window->frame; frame = window->frame;
meta_frame_calc_borders (frame, &borders);
meta_bell_notify_frame_destroy (frame); meta_bell_notify_frame_destroy (frame);
/* Unparent the client window; it may be destroyed, /* Unparent the client window; it may be destroyed,
@ -207,8 +210,8 @@ meta_window_destroy_frame (MetaWindow *window)
* coordinates here means we'll need to ensure a configure * coordinates here means we'll need to ensure a configure
* notify event is sent; see bug 399552. * notify event is sent; see bug 399552.
*/ */
window->frame->rect.x, window->frame->rect.x + borders.invisible.left,
window->frame->rect.y); window->frame->rect.y + borders.invisible.top);
meta_error_trap_pop (window->display); meta_error_trap_pop (window->display);
meta_ui_destroy_frame_window (window->screen->ui, frame->xwindow); meta_ui_destroy_frame_window (window->screen->ui, frame->xwindow);