Index: ui/views/widget/desktop_aura/x11_desktop_handler.cc |
diff --git a/ui/views/widget/desktop_aura/x11_desktop_handler.cc b/ui/views/widget/desktop_aura/x11_desktop_handler.cc |
index 3fd219e8b8a720b5a0a09a5a93dd3895b6ddef6f..6f4d6630284681a60fd7d9f6dbf091492e3e422e 100644 |
--- a/ui/views/widget/desktop_aura/x11_desktop_handler.cc |
+++ b/ui/views/widget/desktop_aura/x11_desktop_handler.cc |
@@ -13,6 +13,7 @@ |
#include "ui/aura/window_event_dispatcher.h" |
#include "ui/base/x/x11_menu_list.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/gfx/x/x11_error_tracker.h" |
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" |
@@ -47,11 +48,9 @@ X11DesktopHandler::X11DesktopHandler() |
ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); |
aura::Env::GetInstance()->AddObserver(this); |
- XWindowAttributes attr; |
- XGetWindowAttributes(xdisplay_, x_root_window_, &attr); |
- XSelectInput(xdisplay_, x_root_window_, |
- attr.your_event_mask | PropertyChangeMask | |
- StructureNotifyMask | SubstructureNotifyMask); |
+ x_root_window_events_.reset(new ui::XScopedEventSelector( |
+ x_root_window_, |
+ PropertyChangeMask | StructureNotifyMask | SubstructureNotifyMask)); |
} |
X11DesktopHandler::~X11DesktopHandler() { |