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

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

Issue 10008084: Add ctrl+drag feature for allowing resizing window with exact positioning. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ctrl-drap for resizing window to pixel level. Created 8 years, 8 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 7e6eb1e59fd17920e183f79af0413aea24766b1b..c8cd3546611c3dae845ed3cf26bd3f11e5358567 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -60,8 +60,11 @@ WorkspaceWindowResizer* WorkspaceWindowResizer::Create(
new WorkspaceWindowResizer(details, attached_windows) : NULL;
}
-void WorkspaceWindowResizer::Drag(const gfx::Point& location) {
- gfx::Rect bounds = CalculateBoundsForDrag(details_, location);
+void WorkspaceWindowResizer::Drag(const gfx::Point& location, int event_flags) {
+ bool disable_snap_to_grid = event_flags & ui::EF_CONTROL_DOWN ? true : false;
+ gfx::Rect bounds =
+ CalculateBoundsForDrag(details_, location, disable_snap_to_grid);
+
if (wm::IsWindowNormal(details_.window))
AdjustBoundsForMainWindow(&bounds);
if (bounds != details_.window->bounds()) {
« ash/wm/default_window_resizer.cc ('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