Index: base/message_pump_glib_x.h |
diff --git a/base/message_pump_glib_x.h b/base/message_pump_glib_x.h |
index 6bd29c9c53911925b203798aff65f20bc89a7c3e..ed29e6a777e2c1cb5643b13df08aed741e249cd8 100644 |
--- a/base/message_pump_glib_x.h |
+++ b/base/message_pump_glib_x.h |
@@ -31,8 +31,23 @@ class MessagePumpGlibX : public MessagePumpForUI { |
virtual bool RunOnce(GMainContext* context, bool block); |
private: |
+ // Some XEvent's can't be directly read from X event queue and will go |
+ // through GDK's dispatching process and may get discarded. This function |
+ // sets up a filter to intercept those XEvent's we are interested in |
+ // and dispatches them so that they won't get lost. |
+ static GdkFilterReturn GdkEventFilter(GdkXEvent* gxevent, |
+ GdkEvent* gevent, |
+ gpointer data); |
+ |
static void EventDispatcherX(GdkEvent* event, gpointer data); |
+ // Decides whether we are interested in processing this XEvent. |
+ bool ShouldCaptureXEvent(XEvent* event); |
+ |
+ // Dispatches the XEvent and returns true if we should exit the current loop |
+ // of message processing. |
+ bool ProcessXEvent(XEvent* event); |
+ |
// Sends the event to the observers. If an observer returns true, then it does |
// not send the event to any other observers and returns true. Returns false |
// if no observer returns true. |