From c8d7b4a79afe0cad52d7e2b04c83a17a06cf5b65 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 28 Mar 2019 09:36:30 +0100 Subject: broadway: Fix coordinates when drag move/resizeing The x/y passed in are in the surface, not root coords. --- gdk/broadway/gdksurface-broadway.c | 16 ++++++++-------- 1 file 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); -- cgit v1.2.1