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

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

Issue 1949393007: X11: Better timestamp handling for _NET_ACTIVE_WINDOW (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ms->microseconds 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 | « tools/metrics/histograms/histograms.xml ('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 5b74e6357c8ed7ec8f33d634cd6d9604cab4e1c4..99594e6a2371595fba900e6bd7f2eda3ecea4ef3 100644
--- a/ui/events/platform/x11/x11_event_source.h
+++ b/ui/events/platform/x11/x11_event_source.h
@@ -16,6 +16,7 @@
using Time = unsigned long;
using XEvent = union _XEvent;
using XID = unsigned long;
+using XWindow = unsigned long;
namespace ui {
@@ -62,6 +63,10 @@ class EVENTS_EXPORT X11EventSource {
XDisplay* display() { return display_; }
Time last_seen_server_time() const { return last_seen_server_time_; }
+ // Explicitly asks the X11 server for the current timestamp, and updates
+ // |last_seen_server_time| with this value.
+ Time UpdateLastSeenServerTime();
+
void StopCurrentEventStream();
void OnDispatcherListChanged();
@@ -85,6 +90,11 @@ class EVENTS_EXPORT X11EventSource {
// The last timestamp seen in an XEvent.
Time last_seen_server_time_;
+ // State necessary for UpdateLastSeenServerTime
+ bool dummy_initialized_;
+ XWindow dummy_window_;
+ XAtom dummy_atom_;
+
// Keeps track of whether this source should continue to dispatch all the
// available events.
bool continue_stream_ = true;
« no previous file with comments | « tools/metrics/histograms/histograms.xml ('k') | ui/events/platform/x11/x11_event_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698