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

Unified Diff: ui/views/widget/desktop_aura/desktop_root_window_host_linux.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: fix compile errors and nit 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/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 bbab014eaf7c90f0159a4faff40cb954390f54ee..eab0191f58b63b644a787c91799efd93a836ba62 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->IsCursorEnabled()) {
+ *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;
« ash/wm/cursor_manager.cc ('K') | « ui/views/widget/desktop_aura/desktop_cursor_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698