| Index: ui/views/test/x11_property_change_waiter.cc
|
| diff --git a/ui/views/test/x11_property_change_waiter.cc b/ui/views/test/x11_property_change_waiter.cc
|
| index c3adc55439d81a9a1f20fad6b3332b48b5c587bf..b9937b3a117d0d687bba8a52c63fbbffb800ba37 100644
|
| --- a/ui/views/test/x11_property_change_waiter.cc
|
| +++ b/ui/views/test/x11_property_change_waiter.cc
|
| @@ -7,27 +7,22 @@
|
| #include <X11/Xlib.h>
|
|
|
| #include "base/run_loop.h"
|
| +#include "ui/base/x/x11_util.h"
|
| #include "ui/base/x/x11_window_event_manager.h"
|
| #include "ui/events/platform/platform_event_source.h"
|
| #include "ui/events/platform/scoped_event_dispatcher.h"
|
| -#include "ui/gfx/x/x11_atom_cache.h"
|
|
|
| namespace views {
|
|
|
| X11PropertyChangeWaiter::X11PropertyChangeWaiter(XID window,
|
| const char* property)
|
| : x_window_(window), property_(property), wait_(true) {
|
| - Display* display = gfx::GetXDisplay();
|
| -
|
| // Ensure that we are listening to PropertyNotify events for |window|. This
|
| // is not the case for windows which were not created by
|
| // DesktopWindowTreeHostX11.
|
| x_window_events_.reset(
|
| new ui::XScopedEventSelector(x_window_, PropertyChangeMask));
|
|
|
| - const char* kAtomsToCache[] = { property, NULL };
|
| - atom_cache_.reset(new ui::X11AtomCache(display, kAtomsToCache));
|
| -
|
| // Override the dispatcher so that we get events before
|
| // DesktopWindowTreeHostX11 does. We must do this because
|
| // DesktopWindowTreeHostX11 stops propagation.
|
| @@ -61,10 +56,9 @@ bool X11PropertyChangeWaiter::CanDispatchEvent(const ui::PlatformEvent& event) {
|
|
|
| uint32_t X11PropertyChangeWaiter::DispatchEvent(
|
| const ui::PlatformEvent& event) {
|
| - if (!wait_ ||
|
| - event->type != PropertyNotify ||
|
| + if (!wait_ || event->type != PropertyNotify ||
|
| event->xproperty.window != x_window_ ||
|
| - event->xproperty.atom != atom_cache_->GetAtom(property_) ||
|
| + event->xproperty.atom != ui::GetAtom(property_) ||
|
| ShouldKeepOnWaiting(event)) {
|
| return ui::POST_DISPATCH_PERFORM_DEFAULT;
|
| }
|
|
|