From a2582172dbb6e54a48b5bc6a69761e2758b712b3 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Thu, 23 May 2019 12:53:03 -0400 Subject: window: Correct coordinates for the configure event We should still correct the coordinates for withdrawn windows. upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/9da3004e --- src/core/window.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/core/window.c b/src/core/window.c index dfa36f18..8e0d89bd 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -5837,11 +5837,15 @@ send_configure_notify (MetaWindow *window) { if (window->withdrawn) { - /* WARNING: x & y need to be set to whatever the XReparentWindow - * call in meta_window_destroy_frame will use so that the window - * has the right coordinates. Currently, that means no change to - * x & y. + MetaFrameBorders borders; + /* We reparent the client window and put it to the position + * where the visible top-left of the frame window currently is. */ + + meta_frame_calc_borders (window->frame, &borders); + + event.xconfigure.x = window->frame->rect.x + borders.invisible.left; + event.xconfigure.y = window->frame->rect.y + borders.invisible.top; } else { -- cgit v1.2.1