All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix netsurf touchscreen behaviour.
@ 2009-09-09  7:27 Graham Gower
  2009-09-09 10:49 ` Phil Blundell
  0 siblings, 1 reply; 3+ messages in thread
From: Graham Gower @ 2009-09-09  7:27 UTC (permalink / raw)
  To: openembedded-devel

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




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-09-10  0:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-09  7:27 [PATCH] Fix netsurf touchscreen behaviour Graham Gower
2009-09-09 10:49 ` Phil Blundell
2009-09-10  0:38   ` Graham Gower

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.