Add a vfunc for _gdk_events_queue

This commit is contained in:
Matthias Clasen 2010-12-10 20:46:42 -05:00
parent ec9c97752d
commit 5fa8791c86
5 changed files with 15 additions and 12 deletions

View File

@ -394,8 +394,8 @@ GdkEvent*
gdk_display_get_event (GdkDisplay *display)
{
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);
}

View File

@ -303,6 +303,7 @@ struct _GdkDisplayClass
void (*sync) (GdkDisplay *display);
void (*flush) (GdkDisplay *display);
gboolean (*has_pending) (GdkDisplay *display);
void (*queue_events) (GdkDisplay *display);
GdkWindow * (*get_default_group) (GdkDisplay *display);
gboolean (*supports_selection_notification) (GdkDisplay *display);
gboolean (*request_selection_notification) (GdkDisplay *display,

View File

@ -2682,6 +2682,7 @@ _gdk_display_x11_class_init (GdkDisplayX11Class * class)
display_class->sync = gdk_x11_display_sync;
display_class->flush = gdk_x11_display_flush;
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->supports_selection_notification = gdk_x11_display_supports_selection_notification;
display_class->request_selection_notification = gdk_x11_display_request_selection_notification;

View File

@ -263,7 +263,7 @@ gdk_event_source_check (GSource *source)
}
void
_gdk_events_queue (GdkDisplay *display)
_gdk_x11_display_queue_events (GdkDisplay *display)
{
GdkEvent *event;
XEvent xevent;
@ -279,14 +279,14 @@ _gdk_events_queue (GdkDisplay *display)
XNextEvent (xdisplay, &xevent);
switch (xevent.type)
{
case KeyPress:
case KeyRelease:
break;
default:
if (XFilterEvent (&xevent, None))
continue;
}
{
case KeyPress:
case KeyRelease:
break;
default:
if (XFilterEvent (&xevent, None))
continue;
}
event = gdk_event_source_translate_event (event_source, &xevent);

View File

@ -149,7 +149,8 @@ void _gdk_x11_display_update_grab_info_ungrab (GdkDisplay *display,
GdkDevice *device,
guint32 time,
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,
GdkDisplay *display);