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

Unified Diff: ash/wm/system_gesture_event_filter.cc

Issue 10820005: ash: Make sure swipe-to-snap gestures work correctly on maximized windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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: 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_,
« 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