* [PATCH] gtk+: do not prelight GtkButton in touchscreen mode
@ 2012-11-27 9:18 Andreas Müller
2012-11-27 9:27 ` Burton, Ross
2012-11-29 18:08 ` Saul Wold
0 siblings, 2 replies; 3+ messages in thread
From: Andreas Müller @ 2012-11-27 9:18 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
...utton-do-not-prelight-in-touchscreen-mode.patch | 48 ++++++++++++++++++++
meta/recipes-gnome/gtk+/gtk+_2.24.13.bb | 3 +-
2 files changed, 50 insertions(+), 1 deletions(-)
create mode 100644 meta/recipes-gnome/gtk+/gtk+-2.24.13/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch
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 0000000..671fd2f
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+-2.24.13/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch
@@ -0,0 +1,48 @@
+From d1f7a894674dfdd6769f1bbae31eb1a69e451a5c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Fri, 16 Nov 2012 22:07:28 +0100
+Subject: [PATCH] GtkButton: do not prelight in touchscreen mode
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Code was copied from GtkToggleButton.
+
+Upstream-status: pending [1]
+
+https://bugzilla.gnome.org/show_bug.cgi?id=689138
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ gtk/gtkbutton.c | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
+index f472007..1beb1b6 100644
+--- a/gtk/gtkbutton.c
++++ b/gtk/gtkbutton.c
+@@ -2079,15 +2079,19 @@ _gtk_button_set_depressed (GtkButton *button,
+ static void
+ gtk_button_update_state (GtkButton *button)
+ {
+- gboolean depressed;
++ gboolean depressed, touchscreen;
+ GtkStateType new_state;
+
++ g_object_get (gtk_widget_get_settings (GTK_WIDGET (button)),
++ "gtk-touchscreen-mode", &touchscreen,
++ NULL);
++
+ if (button->activate_timeout)
+ depressed = button->depress_on_activate;
+ else
+ depressed = button->in_button && button->button_down;
+
+- if (button->in_button && (!button->button_down || !depressed))
++ if (!touchscreen && button->in_button && (!button->button_down || !depressed))
+ new_state = GTK_STATE_PRELIGHT;
+ else
+ new_state = depressed ? GTK_STATE_ACTIVE : GTK_STATE_NORMAL;
+--
+1.7.6.5
+
diff --git a/meta/recipes-gnome/gtk+/gtk+_2.24.13.bb b/meta/recipes-gnome/gtk+/gtk+_2.24.13.bb
index b358b7f..bc88284 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 \
file://toggle-font.diff;striplevel=0 \
file://0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch \
file://doc-fixes.patch \
+ file://0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch \
"
# TO MERGE
@@ -27,7 +28,7 @@ SRC_URI = "http://download.gnome.org/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
# file://combo-arrow-size.patch;striplevel=0
# file://configurefix.patch
-PR = "r1"
+PR = "r2"
SRC_URI[md5sum] = "e949406751df51e1e40e85628005a069"
SRC_URI[sha256sum] = "35e1a01e46b02970b02ee9f299390d0aa57c1215ad2667bcd584b72f4ea6513d"
--
1.7.6.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gtk+: do not prelight GtkButton in touchscreen mode
2012-11-27 9:18 [PATCH] gtk+: do not prelight GtkButton in touchscreen mode Andreas Müller
@ 2012-11-27 9:27 ` Burton, Ross
2012-11-29 18:08 ` Saul Wold
1 sibling, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2012-11-27 9:27 UTC (permalink / raw)
To: Andreas Müller; +Cc: openembedded-core
On 27 November 2012 09:18, Andreas Müller <schnitzeltony@googlemail.com> wrote:
> Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Ross
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gtk+: do not prelight GtkButton in touchscreen mode
2012-11-27 9:18 [PATCH] gtk+: do not prelight GtkButton in touchscreen mode Andreas Müller
2012-11-27 9:27 ` Burton, Ross
@ 2012-11-29 18:08 ` Saul Wold
1 sibling, 0 replies; 3+ messages in thread
From: Saul Wold @ 2012-11-29 18:08 UTC (permalink / raw)
To: Andreas Müller; +Cc: openembedded-core
On 11/27/2012 01:18 AM, Andreas Müller wrote:
> Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> ---
> ...utton-do-not-prelight-in-touchscreen-mode.patch | 48 ++++++++++++++++++++
> meta/recipes-gnome/gtk+/gtk+_2.24.13.bb | 3 +-
> 2 files changed, 50 insertions(+), 1 deletions(-)
> create mode 100644 meta/recipes-gnome/gtk+/gtk+-2.24.13/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch
>
> 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 0000000..671fd2f
> --- /dev/null
> +++ b/meta/recipes-gnome/gtk+/gtk+-2.24.13/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch
> @@ -0,0 +1,48 @@
> +From d1f7a894674dfdd6769f1bbae31eb1a69e451a5c Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
> +Date: Fri, 16 Nov 2012 22:07:28 +0100
> +Subject: [PATCH] GtkButton: do not prelight in touchscreen mode
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +Code was copied from GtkToggleButton.
> +
> +Upstream-status: pending [1]
Proper tag format is Upstream-Status:
Thanks
Sau!
> +
> +https://bugzilla.gnome.org/show_bug.cgi?id=689138
> +
> +Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
> +---
> + gtk/gtkbutton.c | 8 ++++++--
> + 1 files changed, 6 insertions(+), 2 deletions(-)
> +
> +diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
> +index f472007..1beb1b6 100644
> +--- a/gtk/gtkbutton.c
> ++++ b/gtk/gtkbutton.c
> +@@ -2079,15 +2079,19 @@ _gtk_button_set_depressed (GtkButton *button,
> + static void
> + gtk_button_update_state (GtkButton *button)
> + {
> +- gboolean depressed;
> ++ gboolean depressed, touchscreen;
> + GtkStateType new_state;
> +
> ++ g_object_get (gtk_widget_get_settings (GTK_WIDGET (button)),
> ++ "gtk-touchscreen-mode", &touchscreen,
> ++ NULL);
> ++
> + if (button->activate_timeout)
> + depressed = button->depress_on_activate;
> + else
> + depressed = button->in_button && button->button_down;
> +
> +- if (button->in_button && (!button->button_down || !depressed))
> ++ if (!touchscreen && button->in_button && (!button->button_down || !depressed))
> + new_state = GTK_STATE_PRELIGHT;
> + else
> + new_state = depressed ? GTK_STATE_ACTIVE : GTK_STATE_NORMAL;
> +--
> +1.7.6.5
> +
> diff --git a/meta/recipes-gnome/gtk+/gtk+_2.24.13.bb b/meta/recipes-gnome/gtk+/gtk+_2.24.13.bb
> index b358b7f..bc88284 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 \
> file://toggle-font.diff;striplevel=0 \
> file://0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch \
> file://doc-fixes.patch \
> + file://0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch \
> "
>
> # TO MERGE
> @@ -27,7 +28,7 @@ SRC_URI = "http://download.gnome.org/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
> # file://combo-arrow-size.patch;striplevel=0
> # file://configurefix.patch
>
> -PR = "r1"
> +PR = "r2"
>
> SRC_URI[md5sum] = "e949406751df51e1e40e85628005a069"
> SRC_URI[sha256sum] = "35e1a01e46b02970b02ee9f299390d0aa57c1215ad2667bcd584b72f4ea6513d"
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-29 18:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 9:18 [PATCH] gtk+: do not prelight GtkButton in touchscreen mode Andreas Müller
2012-11-27 9:27 ` Burton, Ross
2012-11-29 18:08 ` Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox