diff options
author | Alexander Larsson <alexl@redhat.com> | 2011-03-10 14:58:47 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2011-03-10 14:58:47 +0100 |
commit | d4e2414d4a5cf4c78cca3ef0bc93983a4503b8e4 (patch) | |
tree | 1a5872cd8321dcdac8fcbe0166c25b0c3e4893f9 /gdk/broadway/gdkeventsource.c | |
parent | 3914d0af3856ca5fa2277d879d46ee5666a0cabe (diff) | |
download | gtk+-d4e2414d4a5cf4c78cca3ef0bc93983a4503b8e4.tar.gz |
broadway: Add serial tracking and roundtripping
Diffstat (limited to 'gdk/broadway/gdkeventsource.c')
-rw-r--r-- | gdk/broadway/gdkeventsource.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gdk/broadway/gdkeventsource.c b/gdk/broadway/gdkeventsource.c index c4e20022e7..8a6912c495 100644 --- a/gdk/broadway/gdkeventsource.c +++ b/gdk/broadway/gdkeventsource.c @@ -97,6 +97,7 @@ _gdk_broadway_events_got_input (GdkDisplay *display, GdkWindow *root, *window; char *p; int x, y, button, id, dir,key; + guint32 serial; guint64 time; GdkEvent *event = NULL; char cmd; @@ -107,6 +108,8 @@ _gdk_broadway_events_got_input (GdkDisplay *display, p = (char *)message; cmd = *p++; + serial = (guint32)strtol(p, &p, 10); + p++; /* Skip , */ switch (cmd) { case 'm': id = strtol(p, &p, 10); @@ -137,7 +140,7 @@ _gdk_broadway_events_got_input (GdkDisplay *display, gdk_event_set_device (event, display->core_pointer); node = _gdk_event_queue_append (display, event); - _gdk_windowing_got_event (display, node, event, 0); + _gdk_windowing_got_event (display, node, event, serial); event = gdk_event_new (GDK_FOCUS_CHANGE); event->focus_change.window = g_object_ref (display_broadway->mouse_in_toplevel); @@ -145,7 +148,7 @@ _gdk_broadway_events_got_input (GdkDisplay *display, gdk_event_set_device (event, display->core_pointer); node = _gdk_event_queue_append (display, event); - _gdk_windowing_got_event (display, node, event, 0); + _gdk_windowing_got_event (display, node, event, serial); } /* TODO: Unset when it dies */ @@ -165,7 +168,7 @@ _gdk_broadway_events_got_input (GdkDisplay *display, gdk_event_set_device (event, display->core_pointer); node = _gdk_event_queue_append (display, event); - _gdk_windowing_got_event (display, node, event, 0); + _gdk_windowing_got_event (display, node, event, serial); event = gdk_event_new (GDK_FOCUS_CHANGE); event->focus_change.window = g_object_ref (window); @@ -173,7 +176,7 @@ _gdk_broadway_events_got_input (GdkDisplay *display, gdk_event_set_device (event, display->core_pointer); node = _gdk_event_queue_append (display, event); - _gdk_windowing_got_event (display, node, event, 0); + _gdk_windowing_got_event (display, node, event, serial); } } @@ -190,7 +193,7 @@ _gdk_broadway_events_got_input (GdkDisplay *display, gdk_event_set_device (event, display->core_pointer); node = _gdk_event_queue_append (display, event); - _gdk_windowing_got_event (display, node, event, 0); + _gdk_windowing_got_event (display, node, event, serial); } break; @@ -223,7 +226,7 @@ _gdk_broadway_events_got_input (GdkDisplay *display, gdk_event_set_device (event, display->core_pointer); node = _gdk_event_queue_append (display, event); - _gdk_windowing_got_event (display, node, event, 0); + _gdk_windowing_got_event (display, node, event, serial); } break; @@ -255,7 +258,7 @@ _gdk_broadway_events_got_input (GdkDisplay *display, gdk_event_set_device (event, display->core_pointer); node = _gdk_event_queue_append (display, event); - _gdk_windowing_got_event (display, node, event, 0); + _gdk_windowing_got_event (display, node, event, serial); } break; @@ -277,7 +280,7 @@ _gdk_broadway_events_got_input (GdkDisplay *display, gdk_event_set_device (event, display->core_pointer); node = _gdk_event_queue_append (display, event); - _gdk_windowing_got_event (display, node, event, 0); + _gdk_windowing_got_event (display, node, event, serial); } break; |