[gtk/wip/chergert/quartz4u: 71/120] macos: check for valid GdkEvent
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/quartz4u: 71/120] macos: check for valid GdkEvent
- Date: Tue, 16 Jun 2020 19:36:53 +0000 (UTC)
commit 378a04b5ca8b53e05b40dc88053aa45dc98c50ac
Author: Christian Hergert <chergert redhat com>
Date: Tue May 19 16:57:30 2020 -0700
macos: check for valid GdkEvent
gdk/macos/gdkmacosdisplay-translate.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/gdk/macos/gdkmacosdisplay-translate.c b/gdk/macos/gdkmacosdisplay-translate.c
index 636173aa27..aa73e304cc 100644
--- a/gdk/macos/gdkmacosdisplay-translate.c
+++ b/gdk/macos/gdkmacosdisplay-translate.c
@@ -1212,12 +1212,10 @@ _gdk_macos_display_send_button_event (GdkMacosDisplay *self,
g_return_if_fail (GDK_IS_MACOS_DISPLAY (self));
g_return_if_fail (nsevent != NULL);
- if (!(surface = find_surface_for_ns_event (self, nsevent, &x, &y)))
- return;
-
- event = fill_button_event (self, surface, nsevent, x, y);
- _gdk_windowing_got_event (GDK_DISPLAY (self),
- _gdk_event_queue_append (GDK_DISPLAY (self), event),
- event,
- 0);
+ if ((surface = find_surface_for_ns_event (self, nsevent, &x, &y)) &&
+ (event = fill_button_event (self, surface, nsevent, x, y)))
+ _gdk_windowing_got_event (GDK_DISPLAY (self),
+ _gdk_event_queue_append (GDK_DISPLAY (self), event),
+ event,
+ _gdk_display_get_next_serial (GDK_DISPLAY (self)));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]