broadway: Don't crash of drag-resizing when already active

This is what the X11 code does.
This commit is contained in:
Alexander Larsson 2019-03-22 13:52:08 +01:00
parent 890b759091
commit 3bbbe9f71b

View File

@ -1232,6 +1232,9 @@ gdk_broadway_surface_begin_resize_drag (GdkSurface *surface,
mv_resize = get_move_resize_data (gdk_surface_get_display (surface), TRUE);
if (mv_resize->moveresize_surface != NULL)
return; /* already a drag operation in progress */
mv_resize->is_resize = TRUE;
mv_resize->moveresize_button = button;
mv_resize->resize_edge = edge;
@ -1270,8 +1273,13 @@ gdk_broadway_surface_begin_move_drag (GdkSurface *surface,
if (impl->maximized)
return;
g_print ("gdk_broadway_surface_begin_move_drag\n");
mv_resize = get_move_resize_data (gdk_surface_get_display (surface), TRUE);
if (mv_resize->moveresize_surface != NULL)
return; /* already a drag operation in progress */
mv_resize->is_resize = FALSE;
mv_resize->moveresize_button = button;
mv_resize->moveresize_x = root_x;