From 1250afef7b1d0061dba7a55589b12909459ab191 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Thu, 18 Sep 2014 15:05:10 -0400 Subject: [PATCH] Revert "window-x11: Fix the coordinates we use in the synthetic ConfigureNotify" The coordinates in ConfigureNotify *should* be the coordinates of the client window; using the coordinates of the frame window compensated for a problem with the interpretation of StaticGravity for some clients but broke other clients. This reverts commit f4f70afe313cbae2414296028f24647dbcd65dfd. https://bugzilla.gnome.org/show_bug.cgi?id=736719 --- src/x11/window-x11.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index ebbd22657..282ecd25d 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -214,8 +214,29 @@ send_configure_notify (MetaWindow *window) event.xconfigure.display = window->display->xdisplay; event.xconfigure.event = window->xwindow; event.xconfigure.window = window->xwindow; - event.xconfigure.x = window->rect.x - priv->border_width; - event.xconfigure.y = window->rect.y - priv->border_width; + event.xconfigure.x = priv->client_rect.x - priv->border_width; + event.xconfigure.y = priv->client_rect.y - priv->border_width; + if (window->frame) + { + if (window->withdrawn) + { + 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 + { + /* Need to be in root window coordinates */ + event.xconfigure.x += window->frame->rect.x; + event.xconfigure.y += window->frame->rect.y; + } + } event.xconfigure.width = priv->client_rect.width; event.xconfigure.height = priv->client_rect.height; event.xconfigure.border_width = priv->border_width; /* requested not actual */