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

Side by Side Diff: ui/events/platform/x11/x11_event_source.cc

Issue 1324913002: Fix out of order key events in Chrome on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix spelling error Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « ui/events/platform/x11/x11_event_source.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/events/platform/x11/x11_event_source.h" 5 #include "ui/events/platform/x11/x11_event_source.h"
6 6
7 #include <X11/Xatom.h> 7 #include <X11/Xatom.h>
8 #include <X11/XKBlib.h> 8 #include <X11/XKBlib.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 10
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // It may be useful to eventually align this event dispatch with vsync, but 133 // It may be useful to eventually align this event dispatch with vsync, but
134 // not yet. 134 // not yet.
135 continue_stream_ = true; 135 continue_stream_ = true;
136 while (XPending(display_) && continue_stream_) { 136 while (XPending(display_) && continue_stream_) {
137 XEvent xevent; 137 XEvent xevent;
138 XNextEvent(display_, &xevent); 138 XNextEvent(display_, &xevent);
139 ExtractCookieDataDispatchEvent(&xevent); 139 ExtractCookieDataDispatchEvent(&xevent);
140 } 140 }
141 } 141 }
142 142
143 void X11EventSource::DispatchXEventNow(XEvent* event) {
144 ExtractCookieDataDispatchEvent(event);
145 }
146
143 void X11EventSource::BlockUntilWindowMapped(XID window) { 147 void X11EventSource::BlockUntilWindowMapped(XID window) {
144 BlockOnWindowStructureEvent(window, MapNotify); 148 BlockOnWindowStructureEvent(window, MapNotify);
145 } 149 }
146 150
147 void X11EventSource::BlockUntilWindowUnmapped(XID window) { 151 void X11EventSource::BlockUntilWindowUnmapped(XID window) {
148 BlockOnWindowStructureEvent(window, UnmapNotify); 152 BlockOnWindowStructureEvent(window, UnmapNotify);
149 } 153 }
150 154
151 Time X11EventSource::UpdateLastSeenServerTime() { 155 Time X11EventSource::UpdateLastSeenServerTime() {
152 base::TimeTicks start = base::TimeTicks::Now(); 156 base::TimeTicks start = base::TimeTicks::Now();
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 257
254 void X11EventSource::OnDispatcherListChanged() { 258 void X11EventSource::OnDispatcherListChanged() {
255 if (!hotplug_event_handler_) { 259 if (!hotplug_event_handler_) {
256 hotplug_event_handler_.reset(new X11HotplugEventHandler()); 260 hotplug_event_handler_.reset(new X11HotplugEventHandler());
257 // Force the initial device query to have an update list of active devices. 261 // Force the initial device query to have an update list of active devices.
258 hotplug_event_handler_->OnHotplugEvent(); 262 hotplug_event_handler_->OnHotplugEvent();
259 } 263 }
260 } 264 }
261 265
262 } // namespace ui 266 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/platform/x11/x11_event_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698