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

Unified Diff: ash/display/mirror_window_controller.cc

Issue 558503005: Disable XI2 events on mirror window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review feedback (oshima). Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/mirror_window_controller.cc
diff --git a/ash/display/mirror_window_controller.cc b/ash/display/mirror_window_controller.cc
index ad8db4b6137943a5ace00a4c24468a737b51f36e..f21c8445b21249531926887b3ad9685a389bbb0b 100644
--- a/ash/display/mirror_window_controller.cc
+++ b/ash/display/mirror_window_controller.cc
@@ -6,6 +6,7 @@
#if defined(USE_X11)
#include <X11/Xlib.h>
+#include <X11/extensions/XInput2.h>
// Xlib.h defines RootWindow.
#undef RootWindow
@@ -45,6 +46,12 @@ void DisableInput(XID window) {
long event_mask = ExposureMask | VisibilityChangeMask |
StructureNotifyMask | PropertyChangeMask;
XSelectInput(gfx::GetXDisplay(), window, event_mask);
+ unsigned char mask[XIMaskLen(XI_LASTEVENT)] = {0};
+ XIEventMask evmask;
+ evmask.deviceid = XIAllDevices;
+ evmask.mask_len = sizeof(mask);
+ evmask.mask = mask;
+ XISelectEvents(gfx::GetXDisplay(), window, &evmask, 1);
}
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698