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

Unified Diff: ui/ozone/platform/dri/dri_window_manager.cc

Issue 657603002: ash: ozone: apply transformation to events outside the root window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change GetBounds() visibility from public to protected Created 6 years, 1 month 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/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..b79351f9b270ea9534b0c1568d921cd48d05c032 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) {
+ DCHECK(mouse_events_grabber_ == gfx::kNullAcceleratedWidget);
sadrul 2014/11/11 14:41:14 DCHECK_EQ Have you tested this with nested messag
llandwerlin-old 2014/11/11 18:29:18 Done.
+ mouse_events_grabber_ = widget;
+}
+
+void DriWindowManager::UngrabMouseEvents(gfx::AcceleratedWidget widget) {
+ DCHECK(mouse_events_grabber_ == widget);
sadrul 2014/11/11 14:41:14 ditto
llandwerlin-old 2014/11/11 18:29:18 Moving back to if()s after spang's comment.
+ mouse_events_grabber_ = gfx::kNullAcceleratedWidget;
+}
+
} // namespace ui
« ui/ozone/platform/dri/dri_window.cc ('K') | « ui/ozone/platform/dri/dri_window_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698