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

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

Issue 2398343002: X11: Avoid round-tripping to get the cursor position (Closed)
Patch Set: Revert install-sysroot thing Created 4 years, 2 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
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 cf4051517a0a5cd24c13a4643f1c7724fdf0c11b..0ff50da4cfad81b96ba51bf68638e74dfc1781dd 100644
--- a/ui/events/platform/x11/x11_event_source.h
+++ b/ui/events/platform/x11/x11_event_source.h
@@ -77,6 +77,10 @@ class EVENTS_EXPORT X11EventSource {
// current event does not have a timestamp.
Time GetTimestamp();
+ // If an event is being dispatched, copies the event into *|event| and
+ // returns true. Otherwise *|event| is untouched and this returns false.
+ const XEvent* get_dispatching_event() const { return dispatching_event_; }
sadrul 2016/10/07 02:12:51 Exposing the raw XEvent feels more icky. I would p
Tom (Use chromium acct) 2016/10/07 21:13:18 Done.
+
void StopCurrentEventStream();
void OnDispatcherListChanged();
@@ -108,6 +112,9 @@ class EVENTS_EXPORT X11EventSource {
// The timestamp of the event being dispatched.
Time event_timestamp_;
+ // The event being dispatched, or nullptr if there is none.
+ XEvent* dispatching_event_;
+
// State necessary for UpdateLastSeenServerTime
bool dummy_initialized_;
XWindow dummy_window_;
« no previous file with comments | « no previous file | ui/events/platform/x11/x11_event_source.cc » ('j') | ui/events/platform/x11/x11_event_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698