[mutter] window-x11: Fix the coordinates we use in the synthetic ConfigureNotify
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window-x11: Fix the coordinates we use in the synthetic ConfigureNotify
- Date: Mon, 18 Aug 2014 18:41:47 +0000 (UTC)
commit f4f70afe313cbae2414296028f24647dbcd65dfd
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Aug 18 14:34:35 2014 -0400
window-x11: Fix the coordinates we use in the synthetic ConfigureNotify
Before, we were using the root window coordinates of the client window,
rather than the toplevel frame window. This caused various Java programs
and programs like VirtualBox and WINE to get confused about where their
window actually is, and make bad ConfigureRequests when trying to
position their windows in the future.
Remove the mass of code here by just using window->rect.
src/x11/window-x11.c | 25 ++-----------------------
1 files changed, 2 insertions(+), 23 deletions(-)
---
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index feb1072..796a7be 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -214,29 +214,8 @@ send_configure_notify (MetaWindow *window)
event.xconfigure.display = window->display->xdisplay;
event.xconfigure.event = window->xwindow;
event.xconfigure.window = window->xwindow;
- 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.x = window->rect.x - priv->border_width;
+ event.xconfigure.y = window->rect.y - priv->border_width;
event.xconfigure.width = priv->client_rect.width;
event.xconfigure.height = priv->client_rect.height;
event.xconfigure.border_width = priv->border_width; /* requested not actual */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]