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

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

Issue 2329323002: Avoid blocking while mapping an X11 window (Closed)
Patch Set: Remove UnmapNotify blocking, simplify visibility Created 4 years, 2 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 // 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
60 // xserver that |w| has been mapped; StructureNotifyMask events on |w| are 60 // xserver that |w| has been mapped; StructureNotifyMask events on |w| are
61 // pulled out from the queue and dispatched out of order. 61 // pulled out from the queue and dispatched out of order.
62 // 62 //
63 // 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
64 // which still makes sure the preempted event is dispatched instead of 64 // which still makes sure the preempted event is dispatched instead of
65 // 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
66 // 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
67 // functions which require a mapped window. 67 // functions which require a mapped window.
68 void BlockUntilWindowMapped(XID window); 68 void BlockUntilWindowMapped(XID window);
Tom (Use chromium acct) 2016/09/26 17:26:04 This should be done in the future, but I just want
69 69
70 void BlockUntilWindowUnmapped(XID window);
71
72 XDisplay* display() { return display_; } 70 XDisplay* display() { return display_; }
73 71
74 // Returns the timestamp of the event currently being dispatched. Falls back 72 // Returns the timestamp of the event currently being dispatched. Falls back
75 // on GetCurrentServerTime() if there's no event being dispatched, or if the 73 // on GetCurrentServerTime() if there's no event being dispatched, or if the
76 // current event does not have a timestamp. 74 // current event does not have a timestamp.
77 Time GetTimestamp(); 75 Time GetTimestamp();
78 76
79 void StopCurrentEventStream(); 77 void StopCurrentEventStream();
80 void OnDispatcherListChanged(); 78 void OnDispatcherListChanged();
81 79
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 bool continue_stream_ = true; 115 bool continue_stream_ = true;
118 116
119 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_; 117 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_;
120 118
121 DISALLOW_COPY_AND_ASSIGN(X11EventSource); 119 DISALLOW_COPY_AND_ASSIGN(X11EventSource);
122 }; 120 };
123 121
124 } // namespace ui 122 } // namespace ui
125 123
126 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ 124 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/platform/x11/x11_event_source.cc » ('j') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698