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); |