macos: use simple monotonic for event serial

This commit is contained in:
Christian Hergert 2020-10-13 15:03:44 -07:00
parent d6abc125ad
commit d5b5410b8f
2 changed files with 7 additions and 4 deletions

View File

@ -1179,7 +1179,8 @@ _gdk_macos_display_synthesize_motion (GdkMacosDisplay *self,
y, y,
NULL); NULL);
node = _gdk_event_queue_append (GDK_DISPLAY (self), event); 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 void

View File

@ -380,7 +380,8 @@ gdk_macos_display_sync (GdkDisplay *display)
static gulong static gulong
gdk_macos_display_get_next_serial (GdkDisplay *display) gdk_macos_display_get_next_serial (GdkDisplay *display)
{ {
return 0; static gulong serial = 0;
return ++serial;
} }
static gboolean static gboolean
@ -437,7 +438,7 @@ gdk_macos_display_queue_events (GdkDisplay *display)
_gdk_windowing_got_event (GDK_DISPLAY (self), _gdk_windowing_got_event (GDK_DISPLAY (self),
_gdk_event_queue_append (GDK_DISPLAY (self), event), _gdk_event_queue_append (GDK_DISPLAY (self), event),
event, event,
0); _gdk_display_get_next_serial (GDK_DISPLAY (self)));
} }
else else
{ {
@ -900,7 +901,8 @@ _gdk_macos_display_break_all_grabs (GdkMacosDisplay *self,
grab->surface, grab->surface,
TRUE); TRUE);
node = _gdk_event_queue_append (GDK_DISPLAY (self), event); 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)));
} }
} }
} }