diff options
author | Alexander Larsson <alexl@redhat.com> | 2019-03-28 09:36:30 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2019-03-29 14:30:13 +0100 |
commit | c8d7b4a79afe0cad52d7e2b04c83a17a06cf5b65 (patch) | |
tree | cd20b2d5a8bf4fe54a4f60e5cbe158ba50f484f4 | |
parent | ec9be217710b98f6fd24e03e58ac3306e45aa933 (diff) | |
download | gtk+-c8d7b4a79afe0cad52d7e2b04c83a17a06cf5b65.tar.gz |
broadway: Fix coordinates when drag move/resizeing
The x/y passed in are in the surface, not root coords.
-rw-r--r-- | gdk/broadway/gdksurface-broadway.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c index bc2ca62eed..f5a11a3167 100644 --- a/gdk/broadway/gdksurface-broadway.c +++ b/gdk/broadway/gdksurface-broadway.c @@ -1208,8 +1208,8 @@ gdk_broadway_surface_begin_resize_drag (GdkSurface *surface, GdkSurfaceEdge edge, GdkDevice *device, gint button, - gint root_x, - gint root_y, + gint x, + gint y, guint32 timestamp) { MoveResizeData *mv_resize; @@ -1232,8 +1232,8 @@ gdk_broadway_surface_begin_resize_drag (GdkSurface *surface, mv_resize->is_resize = TRUE; mv_resize->moveresize_button = button; mv_resize->resize_edge = edge; - mv_resize->moveresize_x = root_x; - mv_resize->moveresize_y = root_y; + mv_resize->moveresize_x = x + impl->wrapper->x; + mv_resize->moveresize_y = y + impl->wrapper->y; mv_resize->moveresize_surface = g_object_ref (surface); mv_resize->moveresize_orig_width = gdk_surface_get_width (surface); @@ -1251,8 +1251,8 @@ static void gdk_broadway_surface_begin_move_drag (GdkSurface *surface, GdkDevice *device, gint button, - gint root_x, - gint root_y, + gint x, + gint y, guint32 timestamp) { MoveResizeData *mv_resize; @@ -1274,8 +1274,8 @@ gdk_broadway_surface_begin_move_drag (GdkSurface *surface, mv_resize->is_resize = FALSE; mv_resize->moveresize_button = button; - mv_resize->moveresize_x = root_x; - mv_resize->moveresize_y = root_y; + mv_resize->moveresize_x = x + impl->wrapper->x; + mv_resize->moveresize_y = y + impl->wrapper->y; mv_resize->moveresize_surface = g_object_ref (surface); mv_resize->moveresize_orig_width = gdk_surface_get_width (surface); |