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

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

Issue 2630773002: Avoid blocking while mapping an X11 window (Closed)
Patch Set: Address feedback Created 3 years, 9 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
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // xserver that |w| has been mapped; StructureNotifyMask events on |w| are 66 // xserver that |w| has been mapped; StructureNotifyMask events on |w| are
67 // pulled out from the queue and dispatched out of order. 67 // pulled out from the queue and dispatched out of order.
68 // 68 //
69 // For those that know X11, this is really a wrapper around XWindowEvent 69 // For those that know X11, this is really a wrapper around XWindowEvent
70 // which still makes sure the preempted event is dispatched instead of 70 // which still makes sure the preempted event is dispatched instead of
71 // dropped on the floor. This method exists because mapping a window is 71 // dropped on the floor. This method exists because mapping a window is
72 // asynchronous (and we receive an XEvent when mapped), while there are also 72 // asynchronous (and we receive an XEvent when mapped), while there are also
73 // functions which require a mapped window. 73 // functions which require a mapped window.
74 void BlockUntilWindowMapped(XID window); 74 void BlockUntilWindowMapped(XID window);
75 75
76 void BlockUntilWindowUnmapped(XID window);
77
78 XDisplay* display() { return display_; } 76 XDisplay* display() { return display_; }
79 77
80 // Returns the timestamp of the event currently being dispatched. Falls back 78 // Returns the timestamp of the event currently being dispatched. Falls back
81 // on GetCurrentServerTime() if there's no event being dispatched, or if the 79 // on GetCurrentServerTime() if there's no event being dispatched, or if the
82 // current event does not have a timestamp. 80 // current event does not have a timestamp.
83 Time GetTimestamp(); 81 Time GetTimestamp();
84 82
85 // Returns the root pointer location only if there is an event being 83 // Returns the root pointer location only if there is an event being
86 // dispatched that contains that information. 84 // dispatched that contains that information.
87 base::Optional<gfx::Point> GetRootCursorLocationFromCurrentEvent() const; 85 base::Optional<gfx::Point> GetRootCursorLocationFromCurrentEvent() const;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 bool continue_stream_ = true; 126 bool continue_stream_ = true;
129 127
130 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_; 128 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_;
131 129
132 DISALLOW_COPY_AND_ASSIGN(X11EventSource); 130 DISALLOW_COPY_AND_ASSIGN(X11EventSource);
133 }; 131 };
134 132
135 } // namespace ui 133 } // namespace ui
136 134
137 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ 135 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ssl_client_certificate_selector_browsertest.cc ('k') | ui/events/platform/x11/x11_event_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698