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

Unified Diff: ui/views/widget/desktop_aura/x11_desktop_handler.cc

Issue 2319933002: X11: Remove calls to XSelectInput (Closed)
Patch Set: Comments Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
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() {
« no previous file with comments | « ui/views/widget/desktop_aura/x11_desktop_handler.h ('k') | ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698