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

Unified Diff: ui/aura/window_tree_host_x11.cc

Issue 706763003: x11: Always require XI2.2 for X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 6 years, 1 month 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/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 16096b71809f6833b818fad3d920a411091884b7..7239b048afd79eb9640424a9c128ab3adbf23f06 100644
--- a/ui/aura/window_tree_host_x11.cc
+++ b/ui/aura/window_tree_host_x11.cc
@@ -115,7 +115,6 @@ class TouchEventCalibrate : public ui::PlatformEventObserver {
TouchEventCalibrate() : left_(0), right_(0), top_(0), bottom_(0) {
if (ui::PlatformEventSource::GetInstance())
ui::PlatformEventSource::GetInstance()->AddPlatformEventObserver(this);
-#if defined(USE_XI2_MT)
std::vector<std::string> parts;
if (Tokenize(CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kTouchCalibration),
@@ -130,7 +129,6 @@ class TouchEventCalibrate : public ui::PlatformEventObserver {
if (!base::StringToInt(parts[3], &bottom_))
DLOG(ERROR) << "Incorrect bottom border calibration value passed.";
}
-#endif // defined(USE_XI2_MT)
}
~TouchEventCalibrate() override {
@@ -145,7 +143,6 @@ class TouchEventCalibrate : public ui::PlatformEventObserver {
// which need to be expanded when converting to screen coordinates,
// so that location on bezels will be outside of screen area.
void Calibrate(ui::TouchEvent* event, const gfx::Rect& bounds) {
-#if defined(USE_XI2_MT)
int x = event->x();
int y = event->y();
@@ -197,13 +194,11 @@ class TouchEventCalibrate : public ui::PlatformEventObserver {
event->set_root_location(gfx::Point(x, y));
}
event->set_location(gfx::Point(x, y));
-#endif // defined(USE_XI2_MT)
}
private:
// ui::PlatformEventObserver:
void WillProcessEvent(const ui::PlatformEvent& event) override {
-#if defined(USE_XI2_MT)
if (event->type == GenericEvent &&
(event->xgeneric.evtype == XI_TouchBegin ||
event->xgeneric.evtype == XI_TouchUpdate ||
@@ -213,7 +208,6 @@ class TouchEventCalibrate : public ui::PlatformEventObserver {
xievent->event_x = xievent->root_x;
xievent->event_y = xievent->root_y;
}
-#endif // defined(USE_XI2_MT)
}
void DidProcessEvent(const ui::PlatformEvent& event) override {}
« no previous file with comments | « chrome/browser/chromeos/login/chrome_restart_request.cc ('k') | ui/events/devices/x11/device_data_manager_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698