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

Unified Diff: ui/aura/window.cc

Issue 9580001: Aura: Update window frames, allow resize from outside window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix caption for maximized windows, new resize cursor tweak Created 8 years, 10 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: ui/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index febf221d70604a4860a7614b0e27c63d64e022ee..60977c845bccf890dac9ac7175f3c42e7f25d86c 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -54,7 +54,8 @@ Window::Window(WindowDelegate* delegate)
transparent_(false),
user_data_(NULL),
stops_event_propagation_(false),
- ignore_events_(false) {
+ ignore_events_(false),
+ hit_test_bounds_inset_(0) {
}
Window::~Window() {
@@ -401,8 +402,10 @@ bool Window::ContainsPoint(const gfx::Point& local_point) {
}
bool Window::HitTest(const gfx::Point& local_point) {
+ gfx::Rect local_bounds(gfx::Point(), bounds().size());
+ local_bounds.Inset(hit_test_bounds_inset_, hit_test_bounds_inset_);
// TODO(beng): hittest masks.
- return ContainsPoint(local_point);
+ return local_bounds.Contains(local_point);
}
Window* Window::GetEventHandlerForPoint(const gfx::Point& local_point) {
« no previous file with comments | « ui/aura/window.h ('k') | ui/aura/window_unittest.cc » ('j') | ui/views/widget/root_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698