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

Unified Diff: views/touchui/touch_factory.cc

Issue 7996008: Get views and views_unittests to build w/ use_aura=1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed review issue Created 9 years, 3 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/mouse_watcher.cc ('k') | views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/touchui/touch_factory.cc
diff --git a/views/touchui/touch_factory.cc b/views/touchui/touch_factory.cc
index 81dd41deb83ad7d7fb36c71f9d1969ebb4fd9437..f50e9dac6ba9965faed760e8d24ea157ffb0d002 100644
--- a/views/touchui/touch_factory.cc
+++ b/views/touchui/touch_factory.cc
@@ -4,8 +4,11 @@
#include "views/touchui/touch_factory.h"
+#if defined(TOOLKIT_USES_GTK)
+// TODO(sad) Remove all TOOLKIT_USES_GTK uses once we move to aura only.
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
+#endif
#include <X11/cursorfont.h>
#include <X11/extensions/XInput.h>
#include <X11/extensions/XInput2.h>
@@ -71,6 +74,7 @@ XIValuatorClassInfo* FindTPValuator(Display* display,
return NULL;
}
+#if defined(TOOLKIT_USES_GTK)
// Setup XInput2 select for the GtkWidget.
gboolean GtkWidgetRealizeCallback(GSignalInvocationHint* hint, guint nparams,
const GValue* pvalues, gpointer data) {
@@ -112,6 +116,7 @@ void RemoveGtkWidgetRealizeNotifier() {
realize_signal_id = 0;
realize_hook_id = 0;
}
+#endif
} // namespace
@@ -147,11 +152,12 @@ TouchFactory::TouchFactory()
SetCursorVisible(false, false);
UpdateDeviceList(display);
+#if defined(TOOLKIT_USES_GTK)
// TODO(sad): Here, we only setup so that the X windows created by GTK+ are
// setup for XInput2 events. We need a way to listen for XInput2 events for X
// windows created by other means (e.g. for context menus).
SetupGtkWidgetRealizeNotifier(this);
-
+#endif
// Make sure the list of devices is kept up-to-date by listening for
// XI_HierarchyChanged event on the root window.
unsigned char mask[XIMaskLen(XI_LASTEVENT)];
@@ -177,7 +183,9 @@ TouchFactory::~TouchFactory() {
XFreeCursor(display, invisible_cursor_);
XFreeCursor(display, arrow_cursor_);
+#if defined(TOOLKIT_USES_GTK)
RemoveGtkWidgetRealizeNotifier();
+#endif
}
void TouchFactory::UpdateDeviceList(Display* display) {
« no previous file with comments | « views/mouse_watcher.cc ('k') | views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698