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

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: fix compile on windows 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
« no previous file with comments | « 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..d9c1ae20e21b00e4fee746531a30f030c16c9b97 100644
--- a/views/widget/root_view.cc
+++ b/views/widget/root_view.cc
@@ -6,6 +6,10 @@
#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"
@@ -18,6 +22,10 @@
#if defined(TOUCH_UI)
#include "views/touchui/gesture_manager.h"
+#if defined(HAVE_XINPUT2)
+#include "gfx/gtk_util.h"
+#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()->is_cursor_visible()) {
+ cursor = gfx::GetCursor(GDK_BLANK_CURSOR);
+ }
+#endif
+
gdk_window_set_cursor(native_view->window, cursor);
#endif
}
« no previous file with comments | « views/touchui/touch_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698