As per 
http://vlists.pepperfish.net/pipermail/netsurf-dev-netsurf-browser.org/2009-September/001588.html

Signed-off-by: Graham Gower <[email protected]>
---
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


_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Reply via email to