| Index: ui/ozone/platform/dri/dri_window_manager.cc
|
| diff --git a/ui/ozone/platform/dri/dri_window_manager.cc b/ui/ozone/platform/dri/dri_window_manager.cc
|
| index 289d93061c8acc37de1487e58291e35198a85b9b..107bd9b5388e72d6ff185cd622beac9e9beceaed 100644
|
| --- a/ui/ozone/platform/dri/dri_window_manager.cc
|
| +++ b/ui/ozone/platform/dri/dri_window_manager.cc
|
| @@ -20,7 +20,9 @@ gfx::PointF GetDefaultCursorLocation(DriWindow* window) {
|
| } // namespace
|
|
|
| DriWindowManager::DriWindowManager(HardwareCursorDelegate* cursor_delegate)
|
| - : last_allocated_widget_(0), cursor_(new DriCursor(cursor_delegate, this)) {
|
| + : last_allocated_widget_(0),
|
| + cursor_(new DriCursor(cursor_delegate, this)),
|
| + mouse_events_grabber_(gfx::kNullAcceleratedWidget) {
|
| }
|
|
|
| DriWindowManager::~DriWindowManager() {
|
| @@ -51,6 +53,8 @@ void DriWindowManager::RemoveWindow(gfx::AcceleratedWidget widget) {
|
|
|
| if (cursor_->GetCursorWindow() == widget)
|
| ResetCursorLocation();
|
| + if (mouse_events_grabber_ == widget)
|
| + mouse_events_grabber_ = gfx::kNullAcceleratedWidget;
|
| }
|
|
|
| DriWindow* DriWindowManager::GetWindow(gfx::AcceleratedWidget widget) {
|
| @@ -74,4 +78,14 @@ void DriWindowManager::ResetCursorLocation() {
|
| cursor_->MoveCursorTo(cursor_widget, location);
|
| }
|
|
|
| +void DriWindowManager::GrabMouseEvents(gfx::AcceleratedWidget widget) {
|
| + if (mouse_events_grabber_ == gfx::kNullAcceleratedWidget)
|
| + mouse_events_grabber_ = widget;
|
| +}
|
| +
|
| +void DriWindowManager::UngrabMouseEvents(gfx::AcceleratedWidget widget) {
|
| + if (mouse_events_grabber_ == widget)
|
| + mouse_events_grabber_ = gfx::kNullAcceleratedWidget;
|
| +}
|
| +
|
| } // namespace ui
|
|
|