[gtk+] gesture single: Use gtk_simulate_touchscreen
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gesture single: Use gtk_simulate_touchscreen
- Date: Fri, 31 Jul 2015 17:47:29 +0000 (UTC)
commit 28b4599f9b9907a1de49f83539e7f56f603fa892
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 31 13:45:17 2015 -0400
gesture single: Use gtk_simulate_touchscreen
Instead of manual tests.
gtk/gtkgesturesingle.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkgesturesingle.c b/gtk/gtkgesturesingle.c
index 5b595c5..178e878 100644
--- a/gtk/gtkgesturesingle.c
+++ b/gtk/gtkgesturesingle.c
@@ -147,8 +147,7 @@ gtk_gesture_single_handle_event (GtkEventController *controller,
source = gdk_device_get_source (source_device);
if (source != GDK_SOURCE_TOUCHSCREEN)
- test_touchscreen = ((gtk_get_debug_flags () & GTK_DEBUG_TOUCHSCREEN) != 0 ||
- g_getenv ("GTK_TEST_TOUCHSCREEN"));
+ test_touchscreen = gtk_simulate_touchscreen ();
switch (event->type)
{
@@ -305,8 +304,7 @@ _gtk_gesture_single_update_evmask (GtkGestureSingle *gesture)
priv = gtk_gesture_single_get_instance_private (gesture);
evmask = GDK_TOUCH_MASK;
- if (!priv->touch_only || g_getenv ("GTK_TEST_TOUCHSCREEN") ||
- (gtk_get_debug_flags () & GTK_DEBUG_TOUCHSCREEN) != 0)
+ if (!priv->touch_only || gtk_simulate_touchscreen ())
evmask |= GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
GDK_BUTTON_MOTION_MASK;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]