summaryrefslogtreecommitdiffstats
path: root/ui/aura/window.h
diff options
context:
space:
mode:
authorjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-14 04:04:35 +0000
committerjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-14 04:04:35 +0000
commitbbb59f8114092ee4761598966c5ec8c3fb1c9d68 (patch)
tree02fad3de3ce27f3832caadfd20a45b4c7f78aba8 /ui/aura/window.h
parent2ebf05cb61a5019289a982ba2fd2318debe0d02b (diff)
downloadchromium_src-bbb59f8114092ee4761598966c5ec8c3fb1c9d68.zip
chromium_src-bbb59f8114092ee4761598966c5ec8c3fb1c9d68.tar.gz
chromium_src-bbb59f8114092ee4761598966c5ec8c3fb1c9d68.tar.bz2
Reland: Ash: Allow resize along 1 pixel edge inside window content
The mocks call for resize handles to function along a single pixel edge inside the window, overlapping the web content. Refactored aura::Window::set_hit_test_bounds_inset() into SetHitTestBoundsOverride() to make hover/click events along that border pass through to the non-client area of the window frames. This also allows windows to be resized when they are flush against the top/left/right edges of the screen. BUG=117542 TEST=aura_shell_unittests ShelfLayoutManager, manually resize window from left/right/bottom/top edges Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=126539 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=126544 Review URL: https://chromiumcodereview.appspot.com/9694012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126554 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/window.h')
-rw-r--r--ui/aura/window.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/ui/aura/window.h b/ui/aura/window.h
index ebd3f13..6f6ea8b 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -229,11 +229,12 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
void set_ignore_events(bool ignore_events) { ignore_events_ = ignore_events; }
- // When non-zero insets the window's bounds by |inset| when performing hit
- // tests for event handling. Pass a negative value for |inset| to respond to
- // events that occur slightly outside a window's bounds.
- void set_hit_test_bounds_inset(int inset) { hit_test_bounds_inset_ = inset; }
- int hit_test_bounds_inset() const { return hit_test_bounds_inset_; }
+ // Sets the window to grab hits for an area extending |outer| pixels outside
+ // its bounds and |inner| pixels inside its bounds (even if that inner region
+ // overlaps a child window). This can be used to create an invisible non-
+ // client area, for example if your windows have no visible frames but still
+ // need to have resize edges. Both |outer| and |inner| must be >= 0.
+ void SetHitTestBoundsOverride(int outer, int inner);
// Returns true if the |point_in_root| in root window's coordinate falls
// within this window's bounds. Returns false if the window is detached
@@ -440,8 +441,9 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
// Makes the window pass all events through to any windows behind it.
bool ignore_events_;
- // Inset the window bounds by this amount when doing hit testing for events.
- int hit_test_bounds_inset_;
+ // See SetHitTestBoundsOverride().
+ int hit_test_bounds_override_outer_;
+ int hit_test_bounds_override_inner_;
ObserverList<WindowObserver> observers_;