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

Unified Diff: ui/aura/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: rebase 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_linux.cc
diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc
index e503ab349599e00704f5a0132c67bccb94c1b4ee..8cd5528a703fd202da5133eab75c5d381a898d99 100644
--- a/ui/aura/root_window_host_linux.cc
+++ b/ui/aura/root_window_host_linux.cc
@@ -28,7 +28,6 @@
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/client/user_action_client.h"
-#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
#include "ui/base/cursor/cursor.h"
#include "ui/base/events/event.h"
@@ -594,6 +593,13 @@ void RootWindowHostLinux::SetCursor(gfx::NativeCursor cursor) {
}
bool RootWindowHostLinux::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;
+ }
+
::Window root_return, child_return;
int root_x_return, root_y_return, win_x_return, win_y_return;
unsigned int mask_return;
@@ -658,11 +664,11 @@ void RootWindowHostLinux::UnConfineCursor() {
#endif
}
-void RootWindowHostLinux::OnCursorVisibilityChanged(bool show) {
+void RootWindowHostLinux::OnCursorEnableStateChanged(bool enabled) {
#if defined(OS_CHROMEOS)
// Temporarily pause tap-to-click when the cursor is hidden.
Atom prop = atom_cache_.GetAtom("Tap Paused");
- unsigned char value = !show;
+ unsigned char value = !enabled;
XIDeviceList dev_list =
ui::DeviceListCacheX::GetInstance()->GetXI2DeviceList(xdisplay_);

Powered by Google App Engine
This is Rietveld 408576698