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

Unified Diff: ui/aura/root_window_host_linux.cc

Issue 11035050: Enable CursorManager::LockCursor to lock cursor visibility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months 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 360c872dd50ac4c4eda9fe03542fda9039d5c8a2..89f1ba5bb88975e0741c9a1e9c6cee3aef29b497 100644
--- a/ui/aura/root_window_host_linux.cc
+++ b/ui/aura/root_window_host_linux.cc
@@ -339,7 +339,6 @@ RootWindowHostLinux::RootWindowHostLinux(RootWindowHostDelegate* delegate,
x_root_window_(DefaultRootWindow(xdisplay_)),
current_cursor_(ui::kCursorNull),
window_mapped_(false),
- cursor_shown_(true),
bounds_(bounds),
focus_when_shown_(false),
pointer_barriers_(NULL),
@@ -381,8 +380,6 @@ RootWindowHostLinux::RootWindowHostLinux(RootWindowHostDelegate* delegate,
XGetWindowAttributes(xdisplay_, x_root_window_, &attrs);
x_root_bounds_.SetRect(attrs.x, attrs.y, attrs.width, attrs.height);
- invisible_cursor_ = ui::CreateInvisibleCursor();
-
// TODO(erg): We currently only request window deletion events. We also
// should listen for activation events and anything else that GTK+ listens
// for, and do something useful.
@@ -423,8 +420,6 @@ RootWindowHostLinux::~RootWindowHostLinux() {
UnConfineCursor();
XDestroyWindow(xdisplay_, xwindow_);
-
- XFreeCursor(xdisplay_, invisible_cursor_);
}
bool RootWindowHostLinux::Dispatch(const base::NativeEvent& event) {
@@ -799,16 +794,7 @@ void RootWindowHostLinux::SetCursor(gfx::NativeCursor cursor) {
if (cursor == current_cursor_)
return;
current_cursor_ = cursor;
-
- if (cursor_shown_)
- SetCursorInternal(cursor);
-}
-
-void RootWindowHostLinux::ShowCursor(bool show) {
- if (show == cursor_shown_)
- return;
- cursor_shown_ = show;
- SetCursorInternal(show ? current_cursor_ : invisible_cursor_);
+ SetCursorInternal(cursor);
}
bool RootWindowHostLinux::QueryMouseLocation(gfx::Point* location_return) {

Powered by Google App Engine
This is Rietveld 408576698