Index: ash/wm/system_gesture_event_filter.cc |
diff --git a/ash/wm/system_gesture_event_filter.cc b/ash/wm/system_gesture_event_filter.cc |
index 871129f43e7162b623018efc5ada1d7603003012..4d19efd376d4fade92d90dc491d4dc7b3d43a550 100644 |
--- a/ash/wm/system_gesture_event_filter.cc |
+++ b/ash/wm/system_gesture_event_filter.cc |
@@ -414,7 +414,13 @@ class SystemPinchHandler { |
phantom_state_ = PHANTOM_WINDOW_NORMAL; |
if (event.details().swipe_left() || event.details().swipe_right()) { |
- // Snap for left/right swipes. |
+ // 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_) || |
sky
2012/07/25 04:28:53
Should we check if it has restore bounds instead o
sadrul
2012/07/25 05:37:54
It looks like for vertical/horizontal maximized wi
|
+ wm::IsWindowFullscreen(target_)) |
+ wm::RestoreWindow(target_); |
+ |
ui::ScopedLayerAnimationSettings settings( |
target_->layer()->GetAnimator()); |
SnapSizer sizer(target_, |