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

Unified Diff: ash/wm/default_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
« no previous file with comments | « ash/wm/default_window_resizer.h ('k') | ash/wm/toplevel_window_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/default_window_resizer.cc
diff --git a/ash/wm/default_window_resizer.cc b/ash/wm/default_window_resizer.cc
index 71cbf9e65d4135eebad8853ecd7fe0d91514ce57..08feee5e0cf751ab0eabd06539782b8d3286ac04 100644
--- a/ash/wm/default_window_resizer.cc
+++ b/ash/wm/default_window_resizer.cc
@@ -33,8 +33,10 @@ DefaultWindowResizer::Create(aura::Window* window,
return details.is_resizable ? new DefaultWindowResizer(details) : NULL;
}
-void DefaultWindowResizer::Drag(const gfx::Point& location) {
- gfx::Rect bounds(CalculateBoundsForDrag(details_, location));
+void DefaultWindowResizer::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 (bounds != details_.window->bounds()) {
did_move_or_resize_ = true;
details_.window->SetBounds(bounds);
« no previous file with comments | « ash/wm/default_window_resizer.h ('k') | ash/wm/toplevel_window_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698