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

Unified Diff: ui/aura/root_window_host_win.cc

Issue 11412315: Make the cursor have separate mode for disabled mouse events and invisible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years 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/root_window_host_win.cc
diff --git a/ui/aura/root_window_host_win.cc b/ui/aura/root_window_host_win.cc
index 20faae6b57bfabbfd07cbe45888cec93f21293bc..14f53dca87097ac8d26066b8a80779e50b4e37bd 100644
--- a/ui/aura/root_window_host_win.cc
+++ b/ui/aura/root_window_host_win.cc
@@ -10,6 +10,7 @@
#include "base/message_loop.h"
#include "ui/aura/client/capture_client.h"
+#include "ui/aura/client/cursor_client.h"
#include "ui/aura/root_window.h"
#include "ui/base/cursor/cursor_loader_win.h"
#include "ui/base/events/event.h"
@@ -177,6 +178,13 @@ void RootWindowHostWin::ReleaseCapture() {
}
bool RootWindowHostWin::QueryMouseLocation(gfx::Point* location_return) {
+ client::CursorClient* cursor_client =
+ client::GetCursorClient(GetRootWindow());
+ if (cursor_client && !cursor_client->IsCursorEnabled()) {
+ *location_return = gfx::Point(0, 0);
+ return false;
+ }
+
POINT pt;
GetCursorPos(&pt);
ScreenToClient(hwnd(), &pt);

Powered by Google App Engine
This is Rietveld 408576698