[gtk/readonly-events-1: 10/27] gdk: Use constructor for grab broken



commit b7265e7e733f2cf8e2503f35fd2b31344ff25ea5
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Feb 15 13:19:48 2020 -0500

    gdk: Use constructor for grab broken

 gdk/gdkdisplay.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 5eb928bd0c..91c303688a 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -514,13 +514,11 @@ generate_grab_broken_event (GdkDisplay *display,
     {
       GdkEvent *event;
 
-      event = gdk_event_new (GDK_GRAB_BROKEN);
-      event->any.surface = g_object_ref (surface);
-      event->any.send_event = FALSE;
-      event->grab_broken.implicit = implicit;
-      event->grab_broken.grab_surface = grab_surface;
-      gdk_event_set_device (event, device);
-      event->grab_broken.keyboard = (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD) ? TRUE : FALSE;
+      event = gdk_event_grab_broken_new (surface,
+                                         device,
+                                         device,
+                                         grab_surface,
+                                         implicit);
 
       gdk_display_put_event_nocopy (display, event);
     }


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