Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6417)

Unified Diff: base/message_pump_glib_x.h

Issue 7050030: Fixing the issue of GDK discarding unsupported XInput events. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: addressing some comments Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/message_pump_glib_x.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | base/message_pump_glib_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698