}
void Window::Hide() {
+ // RootWindow::OnVisibilityChanged will call ReleaseCapture.
SetVisible(false);
- ReleaseCapture();
}
bool Window::IsVisible() const {
layout_manager_->OnWindowAddedToLayout(*it);
}
+scoped_ptr<ui::EventTargeter>
+Window::SetEventTargeter(scoped_ptr<ui::EventTargeter> targeter) {
+ scoped_ptr<ui::EventTargeter> old_targeter = targeter_.Pass();
+ targeter_ = targeter.Pass();
+ return old_targeter.Pass();
+}
+
void Window::SetBounds(const gfx::Rect& new_bounds) {
if (parent_ && parent_->layout_manager())
parent_->layout_manager()->SetChildBounds(this, new_bounds);
DCHECK(root_window);
gfx::Point point_in_root(point_in_window);
ConvertPointToTarget(this, root_window, &point_in_root);
- root_window->GetDispatcher()->MoveCursorTo(point_in_root);
+ root_window->GetDispatcher()->host()->MoveCursorTo(point_in_root);
}
gfx::NativeCursor Window::GetCursor(const gfx::Point& point) const {
}
bool Window::HitTest(const gfx::Point& local_point) {
- // Expand my bounds for hit testing (override is usually zero but it's
- // probably cheaper to do the math every time than to branch).
- gfx::Rect local_bounds(gfx::Point(), bounds().size());
- local_bounds.Inset(aura::Env::GetInstance()->is_touch_down() ?
- hit_test_bounds_override_outer_touch_ :
- hit_test_bounds_override_outer_mouse_);
-
+ gfx::Rect local_bounds(bounds().size());
if (!delegate_ || !delegate_->HasHitTestMask())
return local_bounds.Contains(local_point);