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

Unified Diff: views/controls/menu/menu_host_gtk.cc

Issue 6975045: touch: Always expect XInput2 availability. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 7 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: views/controls/menu/menu_host_gtk.cc
diff --git a/views/controls/menu/menu_host_gtk.cc b/views/controls/menu/menu_host_gtk.cc
index 962d701e7ce5248c644cb2f81abfda787f11f3b5..ed7cfa5c965c47d976ef9d02e48baac469cf45f1 100644
--- a/views/controls/menu/menu_host_gtk.cc
+++ b/views/controls/menu/menu_host_gtk.cc
@@ -6,14 +6,14 @@
#include <gdk/gdk.h>
-#if defined(HAVE_XINPUT2) && defined(TOUCH_UI)
+#if defined(TOUCH_UI)
#include <gdk/gdkx.h>
#include <X11/extensions/XInput2.h>
#endif
#include "views/controls/menu/native_menu_host_delegate.h"
-#if defined(HAVE_XINPUT2) && defined(TOUCH_UI)
+#if defined(TOUCH_UI)
#include "views/touchui/touch_factory.h"
#endif
@@ -64,7 +64,7 @@ void MenuHostGtk::StartCapturing() {
DCHECK_EQ(GDK_GRAB_SUCCESS, pointer_grab_status);
DCHECK_EQ(GDK_GRAB_SUCCESS, keyboard_grab_status);
-#if defined(HAVE_XINPUT2) && defined(TOUCH_UI)
+#if defined(TOUCH_UI)
::Window window = GDK_WINDOW_XID(window_contents()->window);
Display* display = GDK_WINDOW_XDISPLAY(window_contents()->window);
bool xi2grab = TouchFactory::GetInstance()->GrabTouchDevices(display, window);
@@ -96,7 +96,7 @@ void MenuHostGtk::ReleaseMouseCapture() {
did_input_grab_ = false;
gdk_pointer_ungrab(GDK_CURRENT_TIME);
gdk_keyboard_ungrab(GDK_CURRENT_TIME);
-#if defined(HAVE_XINPUT2) && defined(TOUCH_UI)
+#if defined(TOUCH_UI)
TouchFactory::GetInstance()->UngrabTouchDevices(
GDK_WINDOW_XDISPLAY(window_contents()->window));
#endif

Powered by Google App Engine
This is Rietveld 408576698