| Submitter | Graham Gower |
|---|---|
| Date | 2009-09-09 07:27:08 |
| Message ID | <4AA758CC.7030505@gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/1042/ |
| State | New |
| Headers | show |
Comments
On Wed, 2009-09-09 at 16:57 +0930, Graham Gower wrote:
> As per http://vlists.pepperfish.net/pipermail/netsurf-dev-netsurf-browser.org/2009-September/001588.html
Is this damaging for non-touchscreen users? It wasn't completely
obvious to me from the patch what effect it would have in that case.
p.
2009/9/9 Phil Blundell <philb@gnu.org>: > On Wed, 2009-09-09 at 16:57 +0930, Graham Gower wrote: >> As per http://vlists.pepperfish.net/pipermail/netsurf-dev-netsurf-browser.org/2009-September/001588.html > > Is this damaging for non-touchscreen users? It wasn't completely > obvious to me from the patch what effect it would have in that case. As far as I can tell, it appears to function with a usb mouse attached. -Graham
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"
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