diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-05-17 19:15:46 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-05-17 19:15:46 +0000 |
commit | c0faf0c6b60508be67770f23bbbd79acae0bfb89 (patch) | |
tree | f1330ec151ca222d68852c88d5acef5d51df73d8 /gdk/broadway | |
parent | 34d7e25a1f4388ea461ffe0693cf31c9a13ce822 (diff) | |
parent | b63690aa6bae23397564a4fc409aa71d00d53229 (diff) | |
download | gtk+-c0faf0c6b60508be67770f23bbbd79acae0bfb89.tar.gz |
Merge branch 'toplevel-move-resize' into 'master'
Toplevel move resize
See merge request GNOME/gtk!1923
Diffstat (limited to 'gdk/broadway')
-rw-r--r-- | gdk/broadway/gdksurface-broadway.c | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c index 7862e1316f..f8702247f6 100644 --- a/gdk/broadway/gdksurface-broadway.c +++ b/gdk/broadway/gdksurface-broadway.c @@ -1192,18 +1192,17 @@ calculate_unmoving_origin (MoveResizeData *mv_resize) } static void -gdk_broadway_surface_begin_resize_drag (GdkSurface *surface, - GdkSurfaceEdge edge, - GdkDevice *device, - gint button, - gint x, - gint y, - guint32 timestamp) +gdk_broadway_toplevel_begin_resize (GdkToplevel *toplevel, + GdkSurfaceEdge edge, + GdkDevice *device, + int button, + double x, + double y, + guint32 timestamp) { + GdkSurface *surface = GDK_SURFACE (toplevel); + GdkBroadwaySurface *impl = GDK_BROADWAY_SURFACE (surface); MoveResizeData *mv_resize; - GdkBroadwaySurface *impl; - - impl = GDK_BROADWAY_SURFACE (surface); if (GDK_SURFACE_DESTROYED (surface)) return; @@ -1235,17 +1234,16 @@ gdk_broadway_surface_begin_resize_drag (GdkSurface *surface, } static void -gdk_broadway_surface_begin_move_drag (GdkSurface *surface, - GdkDevice *device, - gint button, - gint x, - gint y, - guint32 timestamp) +gdk_broadway_toplevel_begin_move (GdkToplevel *toplevel, + GdkDevice *device, + int button, + double x, + double y, + guint32 timestamp) { + GdkSurface *surface = GDK_SURFACE (toplevel); + GdkBroadwaySurface *impl = GDK_BROADWAY_SURFACE (surface); MoveResizeData *mv_resize; - GdkBroadwaySurface *impl; - - impl = GDK_BROADWAY_SURFACE (surface); if (GDK_SURFACE_DESTROYED (surface)) return; @@ -1297,8 +1295,6 @@ gdk_broadway_surface_class_init (GdkBroadwaySurfaceClass *klass) impl_class->set_input_region = gdk_broadway_surface_set_input_region; impl_class->destroy = _gdk_broadway_surface_destroy; impl_class->beep = gdk_broadway_surface_beep; - impl_class->begin_resize_drag = gdk_broadway_surface_begin_resize_drag; - impl_class->begin_move_drag = gdk_broadway_surface_begin_move_drag; impl_class->destroy_notify = gdk_broadway_surface_destroy_notify; impl_class->drag_begin = _gdk_broadway_surface_drag_begin; impl_class->get_scale_factor = gdk_broadway_surface_get_scale_factor; @@ -1648,6 +1644,8 @@ gdk_broadway_toplevel_iface_init (GdkToplevelInterface *iface) iface->lower = gdk_broadway_toplevel_lower; iface->focus = gdk_broadway_toplevel_focus; iface->show_window_menu = gdk_broadway_toplevel_show_window_menu; + iface->begin_resize = gdk_broadway_toplevel_begin_resize; + iface->begin_move = gdk_broadway_toplevel_begin_move; } typedef struct |