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

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: Change a property of a new window instead of the root window 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
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..b874441371c3471db88328eed1486da831cdac1a 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,12 @@ class EVENTS_EXPORT X11EventSource {
// The last timestamp seen in an XEvent.
Time last_seen_server_time_;
+ // State necessary for UpdateLastSeenServerTime
+ bool dummy_initialized_;
+ unsigned char dummy_data_;
+ XWindow dummy_window_;
+ XAtom dummy_atom_;
+
// Keeps track of whether this source should continue to dispatch all the
// available events.
bool continue_stream_ = true;

Powered by Google App Engine
This is Rietveld 408576698