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

Unified Diff: ui/aura/window_tree_host_x11.cc

Issue 872033002: Remove no-op grace area touch calibration code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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: 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 a74d0bb43bc64b57db35c68ae38957870e520b26..50330874381a4357ee762d56ea2bfa252f3164f4 100644
--- a/ui/aura/window_tree_host_x11.cc
+++ b/ui/aura/window_tree_host_x11.cc
@@ -150,38 +150,15 @@ class TouchEventCalibrate : public ui::PlatformEventObserver {
const int resolution_x = bounds.width();
const int resolution_y = bounds.height();
pkotwicz 2015/01/23 19:34:33 My understanding is that the following is always t
Mr4D (OOO till 08-26) 2015/01/27 13:35:45 This has to be enabled by the TP driver. It was me
- // The "grace area" (10% in this case) is to make it easier for the user to
- // navigate to the corner.
- const double kGraceAreaFraction = 0.1;
if (left_ || right_) {
// Offset the x position to the real
x -= left_;
- // Check if we are in the grace area of the left side.
- // Note: We might not want to do this when the gesture is locked?
- if (x < 0 && x > -left_ * kGraceAreaFraction)
- x = 0;
- // Check if we are in the grace area of the right side.
- // Note: We might not want to do this when the gesture is locked?
- if (x > resolution_x - left_ &&
- x < resolution_x - left_ + right_ * kGraceAreaFraction)
- x = resolution_x - left_;
// Scale the screen area back to the full resolution of the screen.
x = (x * resolution_x) / (resolution_x - (right_ + left_));
}
if (top_ || bottom_) {
// When there is a top bezel we add our border,
y -= top_;
-
- // Check if we are in the grace area of the top side.
- // Note: We might not want to do this when the gesture is locked?
- if (y < 0 && y > -top_ * kGraceAreaFraction)
- y = 0;
-
- // Check if we are in the grace area of the bottom side.
- // Note: We might not want to do this when the gesture is locked?
- if (y > resolution_y - top_ &&
- y < resolution_y - top_ + bottom_ * kGraceAreaFraction)
pkotwicz 2015/01/23 19:34:33 My understanding is that this if statement is neve
Mr4D (OOO till 08-26) 2015/01/27 13:35:45 At the moment only the bottom bezel is reliable. Y
- y = resolution_y - top_;
// Scale the screen area back to the full resolution of the screen.
y = (y * resolution_y) / (resolution_y - (bottom_ + top_));
}
« 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