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

Unified Diff: ash/wm/frame_painter.cc

Issue 10854060: ash: Use different hit-test outer-region for mouse and touch events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: scale Created 8 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
« no previous file with comments | « ash/ash_constants.cc ('k') | ash/wm/shelf_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/frame_painter.cc
diff --git a/ash/wm/frame_painter.cc b/ash/wm/frame_painter.cc
index 10fbbc69788f508ae6ed4f4485b6aacc6b17e1b8..50509068e79609816eabe75f44f87c46d6a10126 100644
--- a/ash/wm/frame_painter.cc
+++ b/ash/wm/frame_painter.cc
@@ -181,12 +181,10 @@ void FramePainter::Init(views::Widget* frame,
window_ = frame->GetNativeWindow();
// Ensure we get resize cursors for a few pixels outside our bounds.
- int outside_bounds = ui::GetDisplayLayout() == ui::LAYOUT_TOUCH ?
- kResizeOutsideBoundsSizeTouch :
- kResizeOutsideBoundsSize;
- window_->set_hit_test_bounds_override_outer(
- gfx::Insets(-outside_bounds, -outside_bounds,
- -outside_bounds, -outside_bounds));
+ window_->SetHitTestBoundsOverrideOuter(
+ gfx::Insets(-kResizeOutsideBoundsSize, -kResizeOutsideBoundsSize,
+ -kResizeOutsideBoundsSize, -kResizeOutsideBoundsSize),
+ kResizeOutsideBoundsScaleForTouch);
// Ensure we get resize cursors just inside our bounds as well.
window_->set_hit_test_bounds_override_inner(
gfx::Insets(kResizeInsideBoundsSize, kResizeInsideBoundsSize,
@@ -224,7 +222,7 @@ int FramePainter::NonClientHitTest(views::NonClientFrameView* view,
if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH &&
aura::Env::GetInstance()->is_touch_down()) {
- outside_bounds = kResizeOutsideBoundsSizeTouch;
+ outside_bounds *= kResizeOutsideBoundsScaleForTouch;
}
expanded_bounds.Inset(-outside_bounds, -outside_bounds);
« no previous file with comments | « ash/ash_constants.cc ('k') | ash/wm/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698