[gtk/wip/chergert/gdk-macos-fixes: 2/3] macos: use simple monotonic for event serial
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/gdk-macos-fixes: 2/3] macos: use simple monotonic for event serial
- Date: Wed, 14 Oct 2020 18:34:50 +0000 (UTC)
commit d5b5410b8f319af0db50ef62136f7da38090808d
Author: Christian Hergert <chergert redhat com>
Date: Tue Oct 13 15:03:44 2020 -0700
macos: use simple monotonic for event serial
gdk/macos/gdkmacosdisplay-translate.c | 3 ++-
gdk/macos/gdkmacosdisplay.c | 8 +++++---
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gdk/macos/gdkmacosdisplay-translate.c b/gdk/macos/gdkmacosdisplay-translate.c
index 329f20b0dd..50497320f7 100644
--- a/gdk/macos/gdkmacosdisplay-translate.c
+++ b/gdk/macos/gdkmacosdisplay-translate.c
@@ -1179,7 +1179,8 @@ _gdk_macos_display_synthesize_motion (GdkMacosDisplay *self,
y,
NULL);
node = _gdk_event_queue_append (GDK_DISPLAY (self), event);
- _gdk_windowing_got_event (GDK_DISPLAY (self), node, event, 0);
+ _gdk_windowing_got_event (GDK_DISPLAY (self), node, event,
+ _gdk_display_get_next_serial (GDK_DISPLAY (self)));
}
void
diff --git a/gdk/macos/gdkmacosdisplay.c b/gdk/macos/gdkmacosdisplay.c
index 78af1cefce..6a89def8c1 100644
--- a/gdk/macos/gdkmacosdisplay.c
+++ b/gdk/macos/gdkmacosdisplay.c
@@ -380,7 +380,8 @@ gdk_macos_display_sync (GdkDisplay *display)
static gulong
gdk_macos_display_get_next_serial (GdkDisplay *display)
{
- return 0;
+ static gulong serial = 0;
+ return ++serial;
}
static gboolean
@@ -437,7 +438,7 @@ gdk_macos_display_queue_events (GdkDisplay *display)
_gdk_windowing_got_event (GDK_DISPLAY (self),
_gdk_event_queue_append (GDK_DISPLAY (self), event),
event,
- 0);
+ _gdk_display_get_next_serial (GDK_DISPLAY (self)));
}
else
{
@@ -900,7 +901,8 @@ _gdk_macos_display_break_all_grabs (GdkMacosDisplay *self,
grab->surface,
TRUE);
node = _gdk_event_queue_append (GDK_DISPLAY (self), event);
- _gdk_windowing_got_event (GDK_DISPLAY (self), node, event, 0);
+ _gdk_windowing_got_event (GDK_DISPLAY (self), node, event,
+ _gdk_display_get_next_serial (GDK_DISPLAY (self)));
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]