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

Unified Diff: ash/wm/workspace/workspace_window_resizer.cc

Issue 15008002: Make touch-resizing windows to screen edge possible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 7 years, 7 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
Index: ash/wm/workspace/workspace_window_resizer.cc
diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc
index 25430933827c63762fb0e9b7dcc1cc1d348f5370..5dadccfef0e13a6b4bf140af600840bd7a062c68 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -231,6 +231,9 @@ const int WorkspaceWindowResizer::kMinOnscreenHeight = 32;
// static
const int WorkspaceWindowResizer::kScreenEdgeInset = 8;
+// static
+const int WorkspaceWindowResizer::kScreenEdgeInsetForTouchResize = 16;
+
// Represents the width or height of a window with constraints on its minimum
// and maximum size. 0 represents a lack of a constraint.
class WindowSize {
@@ -327,7 +330,10 @@ void WorkspaceWindowResizer::Drag(const gfx::Point& location_in_parent,
switches::kAshEnableStickyEdges)) {
sticky_size = kStickyDistancePixels;
} else {
- sticky_size = kScreenEdgeInset;
+ if ((details_.bounds_change & kBoundsChange_Resizes) && details_.is_touch)
+ sticky_size = kScreenEdgeInsetForTouchResize;
+ else
+ sticky_size = kScreenEdgeInset;
}
// |bounds| is in |window()->parent()|'s coordinates.
gfx::Rect bounds = CalculateBoundsForDrag(details_, location_in_parent);
« ash/wm/workspace/workspace_window_resizer.h ('K') | « ash/wm/workspace/workspace_window_resizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698