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

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

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.cc
diff --git a/ui/events/platform/x11/x11_event_source.cc b/ui/events/platform/x11/x11_event_source.cc
index a49cda90a74ed351b5a6c367e8120fa359dbf70c..268b2cb2e9bd66311f843a1982fe8eff8a887935 100644
--- a/ui/events/platform/x11/x11_event_source.cc
+++ b/ui/events/platform/x11/x11_event_source.cc
@@ -97,6 +97,7 @@ X11EventSource::X11EventSource(X11EventSourceDelegate* delegate,
: delegate_(delegate),
display_(display),
event_timestamp_(CurrentTime),
+ dispatching_event_(nullptr),
dummy_initialized_(false),
continue_stream_(true) {
DCHECK(!instance_);
@@ -201,12 +202,14 @@ void X11EventSource::ExtractCookieDataDispatchEvent(XEvent* xevent) {
have_cookie = true;
}
+ dispatching_event_ = xevent;
event_timestamp_ = ExtractTimeFromXEvent(*xevent);
delegate_->ProcessXEvent(xevent);
sadrul 2016/10/07 02:12:51 This can trigger a nested message loop, which mean
Tom (Use chromium acct) 2016/10/07 21:13:18 done: added a stack of events to handle this.
PostDispatchEvent(xevent);
event_timestamp_ = CurrentTime;
+ dispatching_event_ = nullptr;
if (have_cookie)
XFreeEventData(xevent->xgeneric.display, &xevent->xcookie);

Powered by Google App Engine
This is Rietveld 408576698