Index: ui/views/widget/desktop_aura/desktop_root_window_host_linux.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_linux.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_linux.cc |
index 1527746d7f95e76766ed6f18300ef31238702f31..2da5937216e0642ec18044a34ff3ee997e813b42 100644 |
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_linux.cc |
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_linux.cc |
@@ -11,6 +11,7 @@ |
#include "base/message_pump_aurax11.h" |
#include "base/stringprintf.h" |
#include "base/utf_string_conversions.h" |
+#include "ui/aura/client/cursor_client.h" |
#include "ui/aura/client/default_capture_client.h" |
#include "ui/aura/client/screen_position_client.h" |
#include "ui/aura/client/user_action_client.h" |
@@ -732,6 +733,13 @@ void DesktopRootWindowHostLinux::SetCursor(gfx::NativeCursor cursor) { |
bool DesktopRootWindowHostLinux::QueryMouseLocation( |
gfx::Point* location_return) { |
+ aura::client::CursorClient* cursor_client = |
+ aura::client::GetCursorClient(GetRootWindow()); |
+ if (cursor_client && !cursor_client->IsMouseEventsEnabled()) { |
+ *location_return = gfx::Point(0, 0); |
+ return false; |
+ } |
+ |
::Window root_return, child_return; |
int root_x_return, root_y_return, win_x_return, win_y_return; |
unsigned int mask_return; |