summaryrefslogtreecommitdiffstats
path: root/ui/aura
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-05 15:19:08 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-05 15:19:08 +0000
commita6b2ce64eccc31cf2e8f9b1dd7b90d8c852becee (patch)
tree9e68ea211a260c0e73e403562fc3eb59baa3e744 /ui/aura
parent65d5835d4734a3106ef715336a05e4c0b3f9e068 (diff)
downloadchromium_src-a6b2ce64eccc31cf2e8f9b1dd7b90d8c852becee.zip
chromium_src-a6b2ce64eccc31cf2e8f9b1dd7b90d8c852becee.tar.gz
chromium_src-a6b2ce64eccc31cf2e8f9b1dd7b90d8c852becee.tar.bz2
Revert 171223.
Build breakage: http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20%28Clang%20dbg%29/builds/25419/steps/compile/logs/stdio Details: ui/aura/root_window_host_linux.cc:629:20: error: no matching function for call to 'XIGetProperty' int result = XIGetProperty(xdisplay_, dev_list[i].deviceid, prop, 0, 0, ^~~~~~~~~~~~~ /usr/include/X11/extensions/XInput2.h:529:1: note: candidate function not viable: no known conversion from 'uint64 *' (aka 'unsigned long long *') to 'unsigned long *' for 10th argument XIGetProperty( ^ 1 error generated. make: *** [out/Debug/obj.target/aura/ui/aura/root_window_host_linux.o] Error 1 > Handling cursor visibility changing events for ChromeOS > > The CL does 5 things: > 1. A handler in RootWindowHost that will be called whenever cursor > visibility is changed. > 2. An utility function in RootWindowHostLinux that can be used to > set XInput device properties. > 3. Use 1) and 2) to temporarily pause trackpad tap-to-click feature > when the cursor is hidden. > 4. Add a cache class that caches X input device lists to minimize > round-trip time to X server for device list queries. > 5. Refactor around the places where XListInputDevices/XIQueryDevice > queries are used. > > Contributed by sheckylin@chromium.org > > BUG=chromium:156697,chrome-os-partner:14085 > TEST=Tested on link. "Tap paused" was successfully set when visibility > changed. > > Change-Id: Ia5c62f821c80efc973e3b1ce54a467b674b466a4 > > > Review URL: https://chromiumcodereview.appspot.com/11316074 TBR=sheckylin@chromium.org Review URL: https://codereview.chromium.org/11454002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171225 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura')
-rw-r--r--ui/aura/remote_root_window_host_win.cc4
-rw-r--r--ui/aura/remote_root_window_host_win.h1
-rw-r--r--ui/aura/root_window.cc1
-rw-r--r--ui/aura/root_window_host.h3
-rw-r--r--ui/aura/root_window_host_linux.cc32
-rw-r--r--ui/aura/root_window_host_linux.h1
-rw-r--r--ui/aura/root_window_host_win.cc4
-rw-r--r--ui/aura/root_window_host_win.h1
8 files changed, 0 insertions, 47 deletions
diff --git a/ui/aura/remote_root_window_host_win.cc b/ui/aura/remote_root_window_host_win.cc
index 773e4fe..fefb127 100644
--- a/ui/aura/remote_root_window_host_win.cc
+++ b/ui/aura/remote_root_window_host_win.cc
@@ -126,10 +126,6 @@ bool RemoteRootWindowHostWin::GrabSnapshot(
void RemoteRootWindowHostWin::UnConfineCursor() {
}
-void RemoteRootWindowHostWin::OnCursorVisibilityChanged(bool show) {
- NOTIMPLEMENTED();
-}
-
void RemoteRootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
}
diff --git a/ui/aura/remote_root_window_host_win.h b/ui/aura/remote_root_window_host_win.h
index a01d489..7227d7b0 100644
--- a/ui/aura/remote_root_window_host_win.h
+++ b/ui/aura/remote_root_window_host_win.h
@@ -60,7 +60,6 @@ class AURA_EXPORT RemoteRootWindowHostWin : public RootWindowHost {
virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE;
virtual bool ConfineCursorToRootWindow() OVERRIDE;
virtual void UnConfineCursor() OVERRIDE;
- virtual void OnCursorVisibilityChanged(bool show) OVERRIDE;
virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE;
virtual bool CopyAreaToSkCanvas(const gfx::Rect& source_bounds,
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 4c7c6dd..33347cb 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -210,7 +210,6 @@ void RootWindow::OnCursorVisibilityChanged(bool show) {
// cursor state.
Env::GetInstance()->SetCursorShown(show);
PostMouseMoveEventAfterWindowChange();
- host_->OnCursorVisibilityChanged(show);
}
void RootWindow::MoveCursorTo(const gfx::Point& location_in_dip) {
diff --git a/ui/aura/root_window_host.h b/ui/aura/root_window_host.h
index 168f2d6..0766a6a 100644
--- a/ui/aura/root_window_host.h
+++ b/ui/aura/root_window_host.h
@@ -83,9 +83,6 @@ class AURA_EXPORT RootWindowHost {
virtual bool ConfineCursorToRootWindow() = 0;
virtual void UnConfineCursor() = 0;
- // Called when the cursor visibility has changed.
- virtual void OnCursorVisibilityChanged(bool show) = 0;
-
// Moves the cursor to the specified location relative to the root window.
virtual void MoveCursorTo(const gfx::Point& location) = 0;
diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc
index 90d2512..ce51c6d 100644
--- a/ui/aura/root_window_host_linux.cc
+++ b/ui/aura/root_window_host_linux.cc
@@ -35,7 +35,6 @@
#include "ui/base/touch/touch_factory.h"
#include "ui/base/ui_base_switches.h"
#include "ui/base/view_prop.h"
-#include "ui/base/x/device_list_cache_x.h"
#include "ui/base/x/valuators.h"
#include "ui/base/x/x11_util.h"
#include "ui/compositor/dip_util.h"
@@ -71,9 +70,6 @@ const char* kAtomsToCache[] = {
"_NET_WM_PING",
"_NET_WM_PID",
"WM_S0",
-#if defined(OS_CHROMEOS)
- "Tap Paused", // Defined in the gestures library.
-#endif
NULL
};
@@ -611,34 +607,6 @@ void RootWindowHostLinux::UnConfineCursor() {
#endif
}
-void RootWindowHostLinux::OnCursorVisibilityChanged(bool show) {
-#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;
- XIDeviceList dev_list =
- ui::DeviceListCacheX::GetInstance()->GetXI2DeviceList(xdisplay_);
-
- // Only slave pointer devices could possibly have tap-paused property.
- for (int i = 0; i < dev_list.count; i++) {
- if (dev_list[i].use == XISlavePointer) {
- Atom old_type;
- int old_format;
- uint64 old_nvalues, bytes;
- unsigned char* data;
- int result = XIGetProperty(xdisplay_, dev_list[i].deviceid, prop, 0, 0,
- False, AnyPropertyType, &old_type, &old_format,
- &old_nvalues, &bytes, &data);
- if (result != Success)
- continue;
- XFree(data);
- XIChangeProperty(xdisplay_, dev_list[i].deviceid, prop, XA_INTEGER, 8,
- PropModeReplace, &value, 1);
- }
- }
-#endif
-}
-
void RootWindowHostLinux::MoveCursorTo(const gfx::Point& location) {
XWarpPointer(xdisplay_, None, x_root_window_, 0, 0, 0, 0,
bounds_.x() + location.x(),
diff --git a/ui/aura/root_window_host_linux.h b/ui/aura/root_window_host_linux.h
index 7e52e1f..220ec7f 100644
--- a/ui/aura/root_window_host_linux.h
+++ b/ui/aura/root_window_host_linux.h
@@ -52,7 +52,6 @@ class RootWindowHostLinux : public RootWindowHost,
virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE;
virtual bool ConfineCursorToRootWindow() OVERRIDE;
virtual void UnConfineCursor() OVERRIDE;
- virtual void OnCursorVisibilityChanged(bool show) OVERRIDE;
virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE;
virtual bool CopyAreaToSkCanvas(const gfx::Rect& source_bounds,
diff --git a/ui/aura/root_window_host_win.cc b/ui/aura/root_window_host_win.cc
index 0aa04fd..e8d50f9 100644
--- a/ui/aura/root_window_host_win.cc
+++ b/ui/aura/root_window_host_win.cc
@@ -212,10 +212,6 @@ void RootWindowHostWin::UnConfineCursor() {
ClipCursor(NULL);
}
-void RootWindowHostWin::OnCursorVisibilityChanged(bool show) {
- NOTIMPLEMENTED();
-}
-
void RootWindowHostWin::MoveCursorTo(const gfx::Point& location) {
POINT pt;
ClientToScreen(hwnd(), &pt);
diff --git a/ui/aura/root_window_host_win.h b/ui/aura/root_window_host_win.h
index d5319ad..5b1a368 100644
--- a/ui/aura/root_window_host_win.h
+++ b/ui/aura/root_window_host_win.h
@@ -32,7 +32,6 @@ class RootWindowHostWin : public RootWindowHost, public ui::WindowImpl {
virtual bool QueryMouseLocation(gfx::Point* location_return) OVERRIDE;
virtual bool ConfineCursorToRootWindow() OVERRIDE;
virtual void UnConfineCursor() OVERRIDE;
- virtual void OnCursorVisibilityChanged(bool show) OVERRIDE;
virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
virtual void SetFocusWhenShown(bool focus_when_shown) OVERRIDE;
virtual bool CopyAreaToSkCanvas(const gfx::Rect& source_bounds,