summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/gtk+/gtk+-2.24.24/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-gnome/gtk+/gtk+-2.24.24/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch')
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.24/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.24/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.24/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch
new file mode 100644
index 0000000000..71e334d897
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+-2.24.24/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch
@@ -0,0 +1,48 @@
1From d1f7a894674dfdd6769f1bbae31eb1a69e451a5c Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
3Date: Fri, 16 Nov 2012 22:07:28 +0100
4Subject: [PATCH] GtkButton: do not prelight in touchscreen mode
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Code was copied from GtkToggleButton.
10
11Upstream-Status: submitted [1]
12
13[1] https://bugzilla.gnome.org/show_bug.cgi?id=689138
14
15Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
16---
17 gtk/gtkbutton.c | 8 ++++++--
18 1 files changed, 6 insertions(+), 2 deletions(-)
19
20diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
21index f472007..1beb1b6 100644
22--- a/gtk/gtkbutton.c
23+++ b/gtk/gtkbutton.c
24@@ -2079,15 +2079,19 @@ _gtk_button_set_depressed (GtkButton *button,
25 static void
26 gtk_button_update_state (GtkButton *button)
27 {
28- gboolean depressed;
29+ gboolean depressed, touchscreen;
30 GtkStateType new_state;
31
32+ g_object_get (gtk_widget_get_settings (GTK_WIDGET (button)),
33+ "gtk-touchscreen-mode", &touchscreen,
34+ NULL);
35+
36 if (button->activate_timeout)
37 depressed = button->depress_on_activate;
38 else
39 depressed = button->in_button && button->button_down;
40
41- if (button->in_button && (!button->button_down || !depressed))
42+ if (!touchscreen && button->in_button && (!button->button_down || !depressed))
43 new_state = GTK_STATE_PRELIGHT;
44 else
45 new_state = depressed ? GTK_STATE_ACTIVE : GTK_STATE_NORMAL;
46--
471.7.6.5
48