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

Unified Diff: ui/aura/window_tree_host_x11.cc

Issue 191223007: Move touch CTM from X into Chrome (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix events/BUILD.gn Created 6 years, 7 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 | « ui/aura/window_tree_host_x11.h ('k') | ui/display/chromeos/display_configurator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_tree_host_x11.cc
diff --git a/ui/aura/window_tree_host_x11.cc b/ui/aura/window_tree_host_x11.cc
index 5fec30cff62fda35b1975630facf2dfe77f50c88..e6445813853b34adce804403e655a92e8faff182 100644
--- a/ui/aura/window_tree_host_x11.cc
+++ b/ui/aura/window_tree_host_x11.cc
@@ -499,6 +499,7 @@ ui::EventProcessor* WindowTreeHostX11::GetEventProcessor() {
void WindowTreeHostX11::DispatchXI2Event(const base::NativeEvent& event) {
ui::TouchFactory* factory = ui::TouchFactory::GetInstance();
XEvent* xev = event;
+ XIDeviceEvent* xiev = static_cast<XIDeviceEvent*>(xev->xcookie.data);
if (!factory->ShouldProcessXI2Event(xev))
return;
@@ -516,19 +517,9 @@ void WindowTreeHostX11::DispatchXI2Event(const base::NativeEvent& event) {
case ui::ET_TOUCH_PRESSED:
case ui::ET_TOUCH_CANCELLED:
case ui::ET_TOUCH_RELEASED: {
-#if defined(OS_CHROMEOS)
- // Bail out early before generating a ui::TouchEvent if this event
- // is not within the range of this RootWindow. Converting an xevent
- // to ui::TouchEvent might change the state of the global touch tracking
- // state, e.g. touch release event can remove the touch id from the
- // record, and doing this multiple time when there are multiple
- // RootWindow will cause problem. So only generate the ui::TouchEvent
- // when we are sure it belongs to this RootWindow.
- if (base::SysInfo::IsRunningOnChromeOS() &&
- !bounds().Contains(ui::EventLocationFromNative(xev)))
- return;
-#endif
ui::TouchEvent touchev(xev);
+ ui::DeviceDataManager::GetInstance()->CalibrateTouchEvent(
+ &touchev, xiev->deviceid, bounds_);
TranslateAndDispatchLocatedEvent(&touchev);
break;
}
« no previous file with comments | « ui/aura/window_tree_host_x11.h ('k') | ui/display/chromeos/display_configurator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698