[gtk/wip/chergert/quartz4u] begin manual resize



commit be25f0ad57f01130bf19247904b4d846a030371d
Author: Christian Hergert <chergert redhat com>
Date:   Thu Apr 30 12:57:16 2020 -0700

    begin manual resize

 gdk/macos/gdkmacossurface.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
---
diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c
index 71bd7f1691..cfce4ae8ca 100644
--- a/gdk/macos/gdkmacossurface.c
+++ b/gdk/macos/gdkmacossurface.c
@@ -103,6 +103,26 @@ gdk_macos_surface_get_scale_factor (GdkSurface *surface)
   return [priv->window backingScaleFactor];
 }
 
+static void
+gdk_macos_surface_begin_resize_drag (GdkSurface     *surface,
+                                     GdkSurfaceEdge  edge,
+                                     GdkDevice      *device,
+                                     int             button,
+                                     int             root_x,
+                                     int             root_y,
+                                     guint32         timestamp)
+{
+  GdkMacosSurface *self = (GdkMacosSurface *)surface;
+  GdkMacosSurfacePrivate *priv = gdk_macos_surface_get_instance_private (self);
+
+  g_assert (GDK_IS_MACOS_SURFACE (self));
+
+  if (GDK_SURFACE_DESTROYED (surface))
+    return;
+
+  [priv->window beginManualResize:edge];
+}
+
 static void
 gdk_macos_surface_destroy (GdkSurface *surface,
                            gboolean    foreign_destroy)
@@ -173,6 +193,7 @@ gdk_macos_surface_class_init (GdkMacosSurfaceClass *klass)
   object_class->set_property = gdk_macos_surface_set_property;
 
   surface_class->destroy = gdk_macos_surface_destroy;
+  surface_class->begin_resize_drag = gdk_macos_surface_begin_resize_drag;
   surface_class->hide = gdk_macos_surface_hide;
   surface_class->set_input_region = gdk_macos_surface_set_input_region;
   surface_class->get_scale_factor = gdk_macos_surface_get_scale_factor;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]