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

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

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 | « chrome/browser/ui/libgtk2ui/libgtk2ui.gyp ('k') | ui/events/platform/x11/x11_event_source.cc » ('j') | 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 #ifndef UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ 5 #ifndef UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_
6 #define UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ 6 #define UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 ~X11EventSource(); 44 ~X11EventSource();
45 45
46 static bool HasInstance(); 46 static bool HasInstance();
47 47
48 static X11EventSource* GetInstance(); 48 static X11EventSource* GetInstance();
49 49
50 // Called when there is a new XEvent available. Processes all (if any) 50 // Called when there is a new XEvent available. Processes all (if any)
51 // available X events. 51 // available X events.
52 void DispatchXEvents(); 52 void DispatchXEvents();
53 53
54 // Dispatches a given event immediately. This is to facilitate sequential
55 // interaction between the gtk event loop (used for IME) and the
56 // main X11 event loop.
57 void DispatchXEventNow(XEvent* event);
58
54 // Blocks on the X11 event queue until we receive notification from the 59 // Blocks on the X11 event queue until we receive notification from the
55 // xserver that |w| has been mapped; StructureNotifyMask events on |w| are 60 // xserver that |w| has been mapped; StructureNotifyMask events on |w| are
56 // pulled out from the queue and dispatched out of order. 61 // pulled out from the queue and dispatched out of order.
57 // 62 //
58 // For those that know X11, this is really a wrapper around XWindowEvent 63 // For those that know X11, this is really a wrapper around XWindowEvent
59 // which still makes sure the preempted event is dispatched instead of 64 // which still makes sure the preempted event is dispatched instead of
60 // dropped on the floor. This method exists because mapping a window is 65 // dropped on the floor. This method exists because mapping a window is
61 // asynchronous (and we receive an XEvent when mapped), while there are also 66 // asynchronous (and we receive an XEvent when mapped), while there are also
62 // functions which require a mapped window. 67 // functions which require a mapped window.
63 void BlockUntilWindowMapped(XID window); 68 void BlockUntilWindowMapped(XID window);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 bool continue_stream_ = true; 113 bool continue_stream_ = true;
109 114
110 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_; 115 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_;
111 116
112 DISALLOW_COPY_AND_ASSIGN(X11EventSource); 117 DISALLOW_COPY_AND_ASSIGN(X11EventSource);
113 }; 118 };
114 119
115 } // namespace ui 120 } // namespace ui
116 121
117 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ 122 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/libgtk2ui.gyp ('k') | ui/events/platform/x11/x11_event_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698