| Index: ash/wm/gestures/system_pinch_handler.cc
|
| diff --git a/ash/wm/gestures/system_pinch_handler.cc b/ash/wm/gestures/system_pinch_handler.cc
|
| index f34836cf534453627c2f9cd701c0b5adf15a466d..3a2cc18f8202b4b920341e7b26658d53b1353d2d 100644
|
| --- a/ash/wm/gestures/system_pinch_handler.cc
|
| +++ b/ash/wm/gestures/system_pinch_handler.cc
|
| @@ -83,21 +83,12 @@ SystemGestureStatus SystemPinchHandler::ProcessGestureEvent(
|
| phantom_state_ = PHANTOM_WINDOW_NORMAL;
|
|
|
| if (event.details().swipe_left() || event.details().swipe_right()) {
|
| - // Snap for left/right swipes. In case the window is
|
| - // maximized/fullscreen, then restore the window first so that tiling
|
| - // works correctly.
|
| - if (wm::IsWindowMaximized(target_) ||
|
| - wm::IsWindowFullscreen(target_))
|
| - wm::RestoreWindow(target_);
|
| -
|
| + // Snap for left/right swipes.
|
| ui::ScopedLayerAnimationSettings settings(
|
| target_->layer()->GetAnimator());
|
| - SnapSizer sizer(target_,
|
| - gfx::Point(),
|
| + wm::SnapWindow(target_,
|
| event.details().swipe_left() ? internal::SnapSizer::LEFT_EDGE :
|
| - internal::SnapSizer::RIGHT_EDGE,
|
| - internal::SnapSizer::OTHER_INPUT);
|
| - target_->SetBounds(sizer.GetSnapBounds(target_->bounds()));
|
| + internal::SnapSizer::RIGHT_EDGE);
|
| } else if (event.details().swipe_up()) {
|
| if (!wm::IsWindowMaximized(target_) &&
|
| !wm::IsWindowFullscreen(target_))
|
|
|