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

Unified Diff: ui/events/platform/x11/x11_event_source.h

Issue 1913913004: Regularly poll the X11 event queue. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase Created 4 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 | « ui/events/event_switches.cc ('k') | ui/events/platform/x11/x11_event_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/platform/x11/x11_event_source.h
diff --git a/ui/events/platform/x11/x11_event_source.h b/ui/events/platform/x11/x11_event_source.h
index d91fefe149b3da8bbd02adfa676cf128db8e21ae..2c3c4e399e334b3d4106c8028d7dec0d20dbe99c 100644
--- a/ui/events/platform/x11/x11_event_source.h
+++ b/ui/events/platform/x11/x11_event_source.h
@@ -28,9 +28,10 @@ class EVENTS_EXPORT X11EventSource : public PlatformEventSource {
static X11EventSource* GetInstance();
- // Called by the glib source dispatch function. Processes all (if any)
- // available X events.
- void DispatchXEvents();
+ // Processes pending X events. Returns true if any events were dispatched.
+ // This function should be called repeatedly until it returns false to
+ // ensure all events are processed.
+ bool DispatchXEvents();
// Blocks on the X11 event queue until we receive notification from the
// xserver that |w| has been mapped; StructureNotifyMask events on |w| are
@@ -59,6 +60,9 @@ class EVENTS_EXPORT X11EventSource : public PlatformEventSource {
// available events.
bool continue_stream_;
+ // Dispatch one event at a time.
+ bool dispatch_one_event_per_loop_;
+
scoped_ptr<X11HotplugEventHandler> hotplug_event_handler_;
DISALLOW_COPY_AND_ASSIGN(X11EventSource);
« no previous file with comments | « ui/events/event_switches.cc ('k') | ui/events/platform/x11/x11_event_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698