From: Graham Gower <graham.gower@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCH] Fix netsurf touchscreen behaviour.
Date: Wed, 09 Sep 2009 16:57:08 +0930 [thread overview]
Message-ID: <4AA758CC.7030505@gmail.com> (raw)
As per http://vlists.pepperfish.net/pipermail/netsurf-dev-netsurf-browser.org/2009-September/001588.html
Signed-off-by: Graham Gower <graham.gower@gmail.com>
---
recipes/netsurf/netsurf-2.1/touchscreen.patch | 21 +++++++++++++++++++++
recipes/netsurf/netsurf_2.1.bb | 3 ++-
2 files changed, 23 insertions(+), 1 deletions(-)
create mode 100644 recipes/netsurf/netsurf-2.1/touchscreen.patch
diff --git a/recipes/netsurf/netsurf-2.1/touchscreen.patch b/recipes/netsurf/netsurf-2.1/touchscreen.patch
new file mode 100644
index 0000000..a6c25dc
--- /dev/null
+++ b/recipes/netsurf/netsurf-2.1/touchscreen.patch
@@ -0,0 +1,21 @@
+--- netsurf.orig/gtk/gtk_window.c
++++ netsurf/gtk/gtk_window.c
+@@ -220,6 +220,7 @@
+ GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK |
+ GDK_POINTER_MOTION_MASK |
++ GDK_POINTER_MOTION_HINT_MASK |
+ GDK_KEY_PRESS_MASK |
+ GDK_KEY_RELEASE_MASK);
+ GTK_WIDGET_SET_FLAGS(GTK_WIDGET(g->drawing_area), GTK_CAN_FOCUS);
+@@ -344,6 +345,10 @@
+ bool shift = event->state & GDK_SHIFT_MASK;
+ bool ctrl = event->state & GDK_CONTROL_MASK;
+
++ if ((abs(event->x - g->last_x) < 5) && (abs(event->y - g->last_y) < 5))
++ /* necessary for touch screens */
++ return FALSE;
++
+ if (g->mouse->state & BROWSER_MOUSE_PRESS_1){
+ /* Start button 1 drag */
+ browser_window_mouse_click(g->bw, BROWSER_MOUSE_DRAG_1,
diff --git a/recipes/netsurf/netsurf_2.1.bb b/recipes/netsurf/netsurf_2.1.bb
index 849a8e5..68da708 100644
--- a/recipes/netsurf/netsurf_2.1.bb
+++ b/recipes/netsurf/netsurf_2.1.bb
@@ -7,11 +7,12 @@ LICENSE = "GPLv2"
SRC_URI = "http://www.netsurf-browser.org/downloads/releases/netsurf-${PV}-src.tar.gz \
file://fix_makefile.patch;patch=1 \
file://debugxml_fix.patch;patch=1 \
+ file://touchscreen.patch;patch=1 \
file://netsurf.png \
file://netsurf.desktop \
file://Makefile.config"
-PR = "r1"
+PR = "r2"
# Workaround for 2.1 tarball (unpacks into netsurf/, not netsurf-2.1/ )
S = "${WORKDIR}/netsurf"
--
1.6.0.3
next reply other threads:[~2009-09-09 7:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-09 7:27 Graham Gower [this message]
2009-09-09 10:49 ` [PATCH] Fix netsurf touchscreen behaviour Phil Blundell
2009-09-10 0:38 ` Graham Gower
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AA758CC.7030505@gmail.com \
--to=graham.gower@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox