[gtk+] wayland: Make toplevels' X/Y coordinates be 0
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Make toplevels' X/Y coordinates be 0
- Date: Tue, 26 Aug 2014 11:00:40 +0000 (UTC)
commit e206b726355d019f8ec8527e15d4fdef48408b7f
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Aug 21 17:39:09 2014 +0200
wayland: Make toplevels' X/Y coordinates be 0
To all effects each window has its own "root" coordinates system, so set
toplevels at 0,0 in that coordinate system, so root coordinate calculations
are locally right.
https://bugzilla.gnome.org/show_bug.cgi?id=729215
gdk/wayland/gdkwindow-wayland.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index f26c3e0..0553522 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -1205,8 +1205,12 @@ gdk_window_wayland_move_resize (GdkWindow *window,
{
if (with_move)
{
- window->x = x;
- window->y = y;
+ /* Each toplevel has in its own "root" coordinate system */
+ if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_TOPLEVEL)
+ {
+ window->x = x;
+ window->y = y;
+ }
}
/* If this function is called with width and height = -1 then that means
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]