diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-03 19:55:17 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-03 19:55:17 +0000 |
commit | 4073be410fe7857ef0032f0bda295970d02b10d3 (patch) | |
tree | 86b115d48416922a9bae3f8296f3cf67c8236546 /ash/wm | |
parent | 5d083dcd9eeaa14c0bd0f1b9a5e3f7b45f6ef250 (diff) | |
download | chromium_src-4073be410fe7857ef0032f0bda295970d02b10d3.zip chromium_src-4073be410fe7857ef0032f0bda295970d02b10d3.tar.gz chromium_src-4073be410fe7857ef0032f0bda295970d02b10d3.tar.bz2 |
ash: Touch-optimize the window-resize region for touch-events only.
Both mouse and touch-events are possible in touch-optimized
UI. But for hit-testing, use touch-optimization only for
touch/gesture-events, and not for mouse-events.
BUG=135187
TEST=manually
Review URL: https://chromiumcodereview.appspot.com/10703069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145359 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm')
-rw-r--r-- | ash/wm/frame_painter.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ash/wm/frame_painter.cc b/ash/wm/frame_painter.cc index 3e74d95..61d66fc 100644 --- a/ash/wm/frame_painter.cc +++ b/ash/wm/frame_painter.cc @@ -15,6 +15,7 @@ #include "third_party/skia/include/core/SkPaint.h" #include "third_party/skia/include/core/SkPath.h" #include "ui/aura/client/aura_constants.h" +#include "ui/aura/env.h" #include "ui/aura/window.h" #include "ui/base/animation/slide_animation.h" #include "ui/base/hit_test.h" @@ -229,10 +230,14 @@ gfx::Rect FramePainter::GetWindowBoundsForClientBounds( int FramePainter::NonClientHitTest(views::NonClientFrameView* view, const gfx::Point& point) { gfx::Rect expanded_bounds = view->bounds(); - int outside_bounds = ui::GetDisplayLayout() == ui::LAYOUT_TOUCH ? - kResizeOutsideBoundsSizeTouch : - kResizeOutsideBoundsSize; + int outside_bounds = kResizeOutsideBoundsSize; + + if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH && + aura::Env::GetInstance()->is_touch_down()) { + outside_bounds = kResizeOutsideBoundsSizeTouch; + } expanded_bounds.Inset(-outside_bounds, -outside_bounds); + if (!expanded_bounds.Contains(point)) return HTNOWHERE; |