[gtk/matthiasc/for-master: 4/18] broadway: Stop using the query_state vfunc




commit dd8ffac26b2039234d7eec63a55be7777e83edd5
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Aug 26 16:03:31 2020 -0400

    broadway: Stop using the query_state vfunc
    
    Just call the backend implementation directly.

 gdk/broadway/gdkdevice-broadway.c  | 9 +--------
 gdk/broadway/gdkdevice-broadway.h  | 7 +++++++
 gdk/broadway/gdksurface-broadway.c | 5 ++---
 3 files changed, 10 insertions(+), 11 deletions(-)
---
diff --git a/gdk/broadway/gdkdevice-broadway.c b/gdk/broadway/gdkdevice-broadway.c
index 8ed1a9ccf4..cbcf5d6e79 100644
--- a/gdk/broadway/gdkdevice-broadway.c
+++ b/gdk/broadway/gdkdevice-broadway.c
@@ -26,12 +26,6 @@
 static void gdk_broadway_device_set_surface_cursor (GdkDevice *device,
                                                     GdkSurface *surface,
                                                     GdkCursor *cursor);
-static void gdk_broadway_device_query_state (GdkDevice        *device,
-                                             GdkSurface       *surface,
-                                             GdkSurface      **child_surface,
-                                             double           *win_x,
-                                             double           *win_y,
-                                             GdkModifierType  *mask);
 static GdkGrabStatus gdk_broadway_device_grab   (GdkDevice     *device,
                                                  GdkSurface     *surface,
                                                  gboolean       owner_events,
@@ -55,7 +49,6 @@ gdk_broadway_device_class_init (GdkBroadwayDeviceClass *klass)
   GdkDeviceClass *device_class = GDK_DEVICE_CLASS (klass);
 
   device_class->set_surface_cursor = gdk_broadway_device_set_surface_cursor;
-  device_class->query_state = gdk_broadway_device_query_state;
   device_class->grab = gdk_broadway_device_grab;
   device_class->ungrab = gdk_broadway_device_ungrab;
   device_class->surface_at_position = gdk_broadway_device_surface_at_position;
@@ -79,7 +72,7 @@ gdk_broadway_device_set_surface_cursor (GdkDevice *device,
 {
 }
 
-static void
+void
 gdk_broadway_device_query_state (GdkDevice         *device,
                                  GdkSurface        *surface,
                                  GdkSurface       **child_surface,
diff --git a/gdk/broadway/gdkdevice-broadway.h b/gdk/broadway/gdkdevice-broadway.h
index 3ee51db4c6..33b715924f 100644
--- a/gdk/broadway/gdkdevice-broadway.h
+++ b/gdk/broadway/gdkdevice-broadway.h
@@ -45,6 +45,13 @@ struct _GdkBroadwayDeviceClass
 G_GNUC_INTERNAL
 GType gdk_broadway_device_get_type (void) G_GNUC_CONST;
 
+void gdk_broadway_device_query_state (GdkDevice        *device,
+                                      GdkSurface       *surface,
+                                      GdkSurface      **child_surface,
+                                      double           *win_x,
+                                      double           *win_y,
+                                      GdkModifierType  *mask);
+
 G_END_DECLS
 
 #endif /* __GDK_DEVICE_BROADWAY_H__ */
diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c
index 0f3240f833..50769c7155 100644
--- a/gdk/broadway/gdksurface-broadway.c
+++ b/gdk/broadway/gdksurface-broadway.c
@@ -30,6 +30,7 @@
 #include "gdkbroadwaydisplay.h"
 #include "gdkdeviceprivate.h"
 #include "gdkdisplay-broadway.h"
+#include "gdkdevice-broadway.h"
 #include "gdkdisplay.h"
 #include "gdkdragsurfaceprivate.h"
 #include "gdkeventsource.h"
@@ -756,9 +757,7 @@ gdk_broadway_surface_get_device_state (GdkSurface      *surface,
   if (GDK_SURFACE_DESTROYED (surface))
     return FALSE;
 
-  GDK_DEVICE_GET_CLASS (device)->query_state (device, surface,
-                                              &child,
-                                              x, y, mask);
+  gdk_broadway_device_query_state (device, surface, &child, x, y, mask);
   return child != NULL;
 }
 


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