[gtk+/gdk-backend] Add a vfunc for _gdk_events_queue
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gdk-backend] Add a vfunc for _gdk_events_queue
- Date: Sat, 11 Dec 2010 01:47:14 +0000 (UTC)
commit 98f6e4563925282c1bffb24f50dec8d6f380aa70
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Dec 10 20:46:42 2010 -0500
Add a vfunc for _gdk_events_queue
gdk/gdkdisplay.c | 4 ++--
gdk/gdkinternals.h | 1 +
gdk/x11/gdkdisplay-x11.c | 1 +
gdk/x11/gdkeventsource.c | 18 +++++++++---------
gdk/x11/gdkprivate-x11.h | 3 ++-
5 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 6397642..06b3c46 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -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);
}
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 318a7e5..15d4a5d 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -300,6 +300,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,
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 01bd040..a2c49e0 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -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;
diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c
index 1692a23..560e4a8 100644
--- a/gdk/x11/gdkeventsource.c
+++ b/gdk/x11/gdkeventsource.c
@@ -267,7 +267,7 @@ gdk_event_source_check (GSource *source)
}
void
-_gdk_events_queue (GdkDisplay *display)
+_gdk_x11_display_queue_events (GdkDisplay *display)
{
GdkEvent *event;
XEvent xevent;
@@ -283,14 +283,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);
diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h
index e878b51..752099c 100644
--- a/gdk/x11/gdkprivate-x11.h
+++ b/gdk/x11/gdkprivate-x11.h
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]