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

Unified Diff: views/widget/root_view.cc

Issue 6242012: touch: Hide the X cursor when not in use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't hide cursor when a mouse event is in progress. Created 9 years, 11 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
« views/touchui/touch_factory.h ('K') | « views/touchui/touch_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/root_view.cc
diff --git a/views/widget/root_view.cc b/views/widget/root_view.cc
index ba60fbccae1fc24eaf8a60975460543af71272df..01237b4e1a9a50de5a82188120f59b7b3aae932e 100644
--- a/views/widget/root_view.cc
+++ b/views/widget/root_view.cc
@@ -6,9 +6,14 @@
#include <algorithm>
+#if defined(TOUCH_UI) && defined(HAVE_XINPUT2)
+#include <gdk/gdkx.h>
+#endif
+
#include "base/logging.h"
#include "base/message_loop.h"
#include "gfx/canvas_skia.h"
+#include "gfx/gtk_util.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "views/focus/view_storage.h"
@@ -18,6 +23,9 @@
#if defined(TOUCH_UI)
#include "views/touchui/gesture_manager.h"
+#if defined(HAVE_XINPUT2)
+#include "views/touchui/touch_factory.h"
+#endif
#endif
#if defined(OS_LINUX)
@@ -794,6 +802,13 @@ void RootView::SetActiveCursor(gfx::NativeCursor cursor) {
static_cast<WidgetGtk*>(GetWidget())->window_contents();
if (!native_view)
return;
+
+#if defined(TOUCH_UI) && defined(HAVE_XINPUT2)
+ if (!TouchFactory::GetInstance()->IsCursorVisible()) {
+ cursor = gfx::GetCursor(GDK_BLANK_CURSOR);
+ }
+#endif
+
gdk_window_set_cursor(native_view->window, cursor);
#endif
}
« views/touchui/touch_factory.h ('K') | « views/touchui/touch_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698