summaryrefslogtreecommitdiffstats
path: root/ui/aura/root_window_host_linux.cc
diff options
context:
space:
mode:
authorvarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-17 21:53:12 +0000
committervarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-17 21:53:12 +0000
commit5922cb23df5b69ece5fb4a022521a591cad21cf4 (patch)
tree15a5b67a1e93d377ab453f3f0c0706f6e7a5ea8c /ui/aura/root_window_host_linux.cc
parentbc7bf1c4bb4d5807709c164e401a42855c153eb0 (diff)
downloadchromium_src-5922cb23df5b69ece5fb4a022521a591cad21cf4.zip
chromium_src-5922cb23df5b69ece5fb4a022521a591cad21cf4.tar.gz
chromium_src-5922cb23df5b69ece5fb4a022521a591cad21cf4.tar.bz2
aura: Add method to the RootWindow to warp the mouse pointer.
BUG=102563 TEST=manually Review URL: http://codereview.chromium.org/9179013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117967 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/root_window_host_linux.cc')
-rw-r--r--ui/aura/root_window_host_linux.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc
index 1556d90..8c3a7ec 100644
--- a/ui/aura/root_window_host_linux.cc
+++ b/ui/aura/root_window_host_linux.cc
@@ -296,6 +296,7 @@ class RootWindowHostLinux : public RootWindowHost,
virtual void SetCursor(gfx::NativeCursor cursor_type) OVERRIDE;
virtual void ShowCursor(bool show) OVERRIDE;
virtual gfx::Point QueryMouseLocation() OVERRIDE;
+ virtual void MoveCursorTo(const gfx::Point& location) OVERRIDE;
virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE;
// MessageLoop::DestructionObserver Overrides.
@@ -631,6 +632,11 @@ gfx::Point RootWindowHostLinux::QueryMouseLocation() {
max(0, min(bounds_.height(), win_y_return)));
}
+void RootWindowHostLinux::MoveCursorTo(const gfx::Point& location) {
+ XWarpPointer(xdisplay_, None, xwindow_, 0, 0, 0, 0, location.x(),
+ location.y());
+}
+
void RootWindowHostLinux::PostNativeEvent(
const base::NativeEvent& native_event) {
DCHECK(xwindow_);