[metacity/wip/gtk-theme: 36/52] window: Correct coordinates for the configure event
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity/wip/gtk-theme: 36/52] window: Correct coordinates for the configure event
- Date: Wed, 7 Jan 2015 12:37:28 +0000 (UTC)
commit 1b73becc2ce6f6d66b1bfb334dfeb5ab78464e61
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Oct 17 21:15:48 2011 -0400
window: Correct coordinates for the configure event
We should still correct the coordinates for withdrawn windows.
src/core/window.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index ffa1bb8..fd0548e 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -5706,11 +5706,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
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]