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

Unified Diff: ui/events/x/touch_factory_x11.cc

Issue 404423002: Listen for key events in SetupXI2ForXWindow() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: restrict to ChromeOS (plus rebase) Created 6 years, 4 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/events/x/touch_factory_x11.cc
diff --git a/ui/events/x/touch_factory_x11.cc b/ui/events/x/touch_factory_x11.cc
index 994f1ec80fdf70121fcb1add39d7840b3f902280..e016ea642a197d887fe3591619d8465db37dab92 100644
--- a/ui/events/x/touch_factory_x11.cc
+++ b/ui/events/x/touch_factory_x11.cc
@@ -18,6 +18,7 @@
#include "base/message_loop/message_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
+#include "base/sys_info.h"
#include "ui/events/event_switches.h"
#include "ui/events/x/device_data_manager_x11.h"
#include "ui/events/x/device_list_cache_x.h"
@@ -210,6 +211,12 @@ void TouchFactory::SetupXI2ForXWindow(Window window) {
XISetMask(mask, XI_ButtonPress);
XISetMask(mask, XI_ButtonRelease);
XISetMask(mask, XI_Motion);
+#if defined(OS_CHROMEOS)
+ if (base::SysInfo::IsRunningOnChromeOS()) {
+ XISetMask(mask, XI_KeyPress);
+ XISetMask(mask, XI_KeyRelease);
+ }
+#endif
XIEventMask evmask;
evmask.deviceid = XIAllDevices;

Powered by Google App Engine
This is Rietveld 408576698