Commit 5fa8791c authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Add a vfunc for _gdk_events_queue

parent ec9c9775
...@@ -394,8 +394,8 @@ GdkEvent* ...@@ -394,8 +394,8 @@ GdkEvent*
gdk_display_get_event (GdkDisplay *display) gdk_display_get_event (GdkDisplay *display)
{ {
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL); g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
_gdk_events_queue (display); GDK_DISPLAY_GET_CLASS (display)->queue_events (display);
return _gdk_event_unqueue (display); return _gdk_event_unqueue (display);
} }
......
...@@ -303,6 +303,7 @@ struct _GdkDisplayClass ...@@ -303,6 +303,7 @@ struct _GdkDisplayClass
void (*sync) (GdkDisplay *display); void (*sync) (GdkDisplay *display);
void (*flush) (GdkDisplay *display); void (*flush) (GdkDisplay *display);
gboolean (*has_pending) (GdkDisplay *display); gboolean (*has_pending) (GdkDisplay *display);
void (*queue_events) (GdkDisplay *display);
GdkWindow * (*get_default_group) (GdkDisplay *display); GdkWindow * (*get_default_group) (GdkDisplay *display);
gboolean (*supports_selection_notification) (GdkDisplay *display); gboolean (*supports_selection_notification) (GdkDisplay *display);
gboolean (*request_selection_notification) (GdkDisplay *display, gboolean (*request_selection_notification) (GdkDisplay *display,
......
...@@ -2682,6 +2682,7 @@ _gdk_display_x11_class_init (GdkDisplayX11Class * class) ...@@ -2682,6 +2682,7 @@ _gdk_display_x11_class_init (GdkDisplayX11Class * class)
display_class->sync = gdk_x11_display_sync; display_class->sync = gdk_x11_display_sync;
display_class->flush = gdk_x11_display_flush; display_class->flush = gdk_x11_display_flush;
display_class->has_pending = gdk_x11_display_has_pending; display_class->has_pending = gdk_x11_display_has_pending;
display_class->queue_events = _gdk_x11_display_queue_events;
display_class->get_default_group = gdk_x11_display_get_default_group; display_class->get_default_group = gdk_x11_display_get_default_group;
display_class->supports_selection_notification = gdk_x11_display_supports_selection_notification; display_class->supports_selection_notification = gdk_x11_display_supports_selection_notification;
display_class->request_selection_notification = gdk_x11_display_request_selection_notification; display_class->request_selection_notification = gdk_x11_display_request_selection_notification;
......
...@@ -263,7 +263,7 @@ gdk_event_source_check (GSource *source) ...@@ -263,7 +263,7 @@ gdk_event_source_check (GSource *source)
} }
void void
_gdk_events_queue (GdkDisplay *display) _gdk_x11_display_queue_events (GdkDisplay *display)
{ {
GdkEvent *event; GdkEvent *event;
XEvent xevent; XEvent xevent;
...@@ -279,14 +279,14 @@ _gdk_events_queue (GdkDisplay *display) ...@@ -279,14 +279,14 @@ _gdk_events_queue (GdkDisplay *display)
XNextEvent (xdisplay, &xevent); XNextEvent (xdisplay, &xevent);
switch (xevent.type) switch (xevent.type)
{ {
case KeyPress: case KeyPress:
case KeyRelease: case KeyRelease:
break; break;
default: default:
if (XFilterEvent (&xevent, None)) if (XFilterEvent (&xevent, None))
continue; continue;
} }
event = gdk_event_source_translate_event (event_source, &xevent); event = gdk_event_source_translate_event (event_source, &xevent);
......
...@@ -149,7 +149,8 @@ void _gdk_x11_display_update_grab_info_ungrab (GdkDisplay *display, ...@@ -149,7 +149,8 @@ void _gdk_x11_display_update_grab_info_ungrab (GdkDisplay *display,
GdkDevice *device, GdkDevice *device,
guint32 time, guint32 time,
gulong serial); gulong serial);
void _gdk_x11_device_check_extension_events (GdkDevice *device); void _gdk_x11_display_queue_events (GdkDisplay *display);
void _gdk_x11_device_check_extension_events (GdkDevice *device);
void _gdk_x11_display_manager_add_display (GdkDisplayManager *manager, void _gdk_x11_display_manager_add_display (GdkDisplayManager *manager,
GdkDisplay *display); GdkDisplay *display);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment