summaryrefslogtreecommitdiffstats
path: root/ash/wm/window_resizer.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-17 16:22:00 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-17 16:22:00 +0000
commit83926efa82ad28cac5766154d6dbb37bdb7473bd (patch)
tree3739db259d1f0a4c4d3dc1151877d4715bbfc092 /ash/wm/window_resizer.cc
parent30c55372215faa0d58b6f52896b2dadb0f6b1f0c (diff)
downloadchromium_src-83926efa82ad28cac5766154d6dbb37bdb7473bd.zip
chromium_src-83926efa82ad28cac5766154d6dbb37bdb7473bd.tar.gz
chromium_src-83926efa82ad28cac5766154d6dbb37bdb7473bd.tar.bz2
Adds ability to stop updating the cursor and wires it up when
dragging/moving windows. We need this when resizing along the grid as it's possible to move outside the drag area so that the cursor would normally be reset. BUG=none TEST=none R=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/9365071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122519 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/window_resizer.cc')
-rw-r--r--ash/wm/window_resizer.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/ash/wm/window_resizer.cc b/ash/wm/window_resizer.cc
index 3953fb9..9cc1c2a 100644
--- a/ash/wm/window_resizer.cc
+++ b/ash/wm/window_resizer.cc
@@ -4,7 +4,10 @@
#include "ash/wm/window_resizer.h"
+#include "ash/shell.h"
+#include "ash/wm/root_window_event_filter.h"
#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
#include "ui/base/hit_test.h"
@@ -142,10 +145,18 @@ WindowResizer::WindowResizer(aura::Window* window,
is_resizable_(bounds_change_ != kBoundsChangeDirection_None &&
IsNormalWindow(window)),
grid_size_(grid_size),
- did_move_or_resize_(false) {
+ did_move_or_resize_(false),
+ root_filter_(NULL) {
+ if (is_resizable_) {
+ root_filter_ = Shell::GetInstance()->root_filter();
+ if (root_filter_)
+ root_filter_->LockCursor();
+ }
}
WindowResizer::~WindowResizer() {
+ if (root_filter_)
+ root_filter_->UnlockCursor();
}
// static