summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@googlemail.com>2012-11-30 13:34:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-03 13:52:04 +0000
commitbcfb295be7781ba5126fc4a710346d6b89448b90 (patch)
tree2bd1ec7bd74c692da1aad172db3c656b53b1950e
parent247b6a3754c2c50318e2a73d79981ba0e9cb560b (diff)
downloadpoky-bcfb295be7781ba5126fc4a710346d6b89448b90.tar.gz
gtk+: do not prelight GtkButton in touchscreen mode
(From OE-Core rev: 08119d076853dbf5273c01bb095d2e1618475a57) Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.13/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch48
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.24.13.bb3
2 files changed, 50 insertions, 1 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.13/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.13/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.13/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
diff --git a/meta/recipes-gnome/gtk+/gtk+_2.24.13.bb b/meta/recipes-gnome/gtk+/gtk+_2.24.13.bb
index b358b7f7cb..bc882841a8 100644
--- a/meta/recipes-gnome/gtk+/gtk+_2.24.13.bb
+++ b/meta/recipes-gnome/gtk+/gtk+_2.24.13.bb
@@ -13,6 +13,7 @@ SRC_URI = "http://download.gnome.org/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
13 file://toggle-font.diff;striplevel=0 \ 13 file://toggle-font.diff;striplevel=0 \
14 file://0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch \ 14 file://0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch \
15 file://doc-fixes.patch \ 15 file://doc-fixes.patch \
16 file://0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch \
16 " 17 "
17 18
18# TO MERGE 19# TO MERGE
@@ -27,7 +28,7 @@ SRC_URI = "http://download.gnome.org/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
27# file://combo-arrow-size.patch;striplevel=0 28# file://combo-arrow-size.patch;striplevel=0
28# file://configurefix.patch 29# file://configurefix.patch
29 30
30PR = "r1" 31PR = "r2"
31 32
32SRC_URI[md5sum] = "e949406751df51e1e40e85628005a069" 33SRC_URI[md5sum] = "e949406751df51e1e40e85628005a069"
33SRC_URI[sha256sum] = "35e1a01e46b02970b02ee9f299390d0aa57c1215ad2667bcd584b72f4ea6513d" 34SRC_URI[sha256sum] = "35e1a01e46b02970b02ee9f299390d0aa57c1215ad2667bcd584b72f4ea6513d"