summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2011-10-17 21:15:48 -0400
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2015-01-20 19:53:21 +0200
commit9da3004e15f172cad26c5072212aa813feaf85a8 (patch)
tree948ad215eba30ad0e39fb50bd6f89226d2630add
parent9fe51fd0b1bd7a23e28cb0e8c6f6e9c681666182 (diff)
downloadmetacity-9da3004e15f172cad26c5072212aa813feaf85a8.tar.gz
window: Correct coordinates for the configure event
We should still correct the coordinates for withdrawn windows.
-rw-r--r--src/core/window.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/window.c b/src/core/window.c
index e394d578..20173a02 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -5708,11 +5708,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
{