Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 86577 Details for
Bug 132959
x11-drivers/synaptics: twofinger use flag for two finger scrolling with touch pad
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Mac style twofinger scrolling.
synaptics-0.14.4-r3-twofinger.patch (text/plain), 7.63 KB, created by
Antony Mee
on 2006-05-10 15:56:33 UTC
(
hide
)
Description:
Mac style twofinger scrolling.
Filename:
MIME Type:
Creator:
Antony Mee
Created:
2006-05-10 15:56:33 UTC
Size:
7.63 KB
patch
obsolete
>diff -Naur synaptics-0.14.4/manpages/synaptics.5 synaptics-0.14.4-1/manpages/synaptics.5 >--- synaptics-0.14.4/manpages/synaptics.5 2005-11-06 16:29:34.000000000 +0100 >+++ synaptics-0.14.4-1/manpages/synaptics.5 2006-03-17 15:21:23.000000000 +0100 >@@ -123,6 +123,19 @@ > \fBHorizScrollDelta\fR (Integer) > Move distance of the finger for a scroll event. > .TP >+\fBTwoFingerScoll\fR (Integer) >+Enable scrolling events when dragging two fingers simultaneously >+(not all hardware supports this). >+. >+The possible values are: >+.TS >+l l. >+ 0 disable two-finger scrolling >+ 1 scroll only in horizontal direction >+ 2 scroll only in vertical direction >+ 3 scroll in both directions. >+.TE >+.TP > \fBEdgeMotionMinZ\fR (Integer) > Finger pressure at which minimum edge motion speed is set. > .TP >diff -Naur synaptics-0.14.4/synaptics.c synaptics-0.14.4-1/synaptics.c >--- synaptics-0.14.4/synaptics.c 2005-11-05 21:59:23.000000000 +0100 >+++ synaptics-0.14.4-1/synaptics.c 2006-03-15 04:07:54.000000000 +0100 >@@ -1,11 +1,14 @@ > /* >+ * Copyright 2006 Stefan Bethge <stefan.bethge@web.de> >+ * patch for two-fingered scrolling >+ * > * Copyright 2004 Matthias Ihmig <m.ihmig@gmx.net> > * patch for pressure dependent EdgeMotion speed > * > * Copyright 2004 Alexei Gilchrist <alexei@physics.uq.edu.au> > * patch for circular scrolling > * >- * Copyright 2003 Jörg Bösner <ich@joerg-boesner.de> >+ * Copyright 2003 Jörg Bösner <ich@joerg-boesner.de> > * patch for switching the touchpad off (for example, when a > * USB mouse is connected) > * >@@ -357,6 +360,7 @@ > "EmulateMidButtonTime", 75); > pars->scroll_dist_vert = xf86SetIntOption(local->options, "VertScrollDelta", 100); > pars->scroll_dist_horiz = xf86SetIntOption(local->options, "HorizScrollDelta", 100); >+ pars->scroll_two_fingers = xf86SetIntOption(local->options, "TwoFingerScroll", 0); > pars->edge_motion_min_z = xf86SetIntOption(local->options, "EdgeMotionMinZ", 30); > pars->edge_motion_max_z = xf86SetIntOption(local->options, "EdgeMotionMaxZ", 160); > pars->edge_motion_min_speed = xf86SetIntOption(local->options, "EdgeMotionMinSpeed", 1); >@@ -481,7 +485,7 @@ > static void > SynapticsCtrl(DeviceIntPtr device, PtrCtrl *ctrl) > { >- DBG(3, ErrorF("SynapticsCtrl called.\n")); >+ DBG(7, ErrorF("SynapticsCtrl called.\n")); > /* > pInfo = device->public.devicePrivate; > pMse = pInfo->private; >@@ -523,7 +527,7 @@ > LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate; > SynapticsPrivate *priv = (SynapticsPrivate *) (local->private); > >- DBG(3, ErrorF("Synaptics DeviceOn called\n")); >+ DBG(7, ErrorF("Synaptics DeviceOn called\n")); > > SetDeviceAndProtocol(local); > local->fd = xf86OpenSerial(local->options); >@@ -557,7 +561,7 @@ > LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate; > SynapticsPrivate *priv = (SynapticsPrivate *) (local->private); > >- DBG(3, ErrorF("Synaptics DeviceOff called\n")); >+ DBG(7, ErrorF("Synaptics DeviceOff called\n")); > > if (local->fd != -1) { > TimerFree(priv->timer); >@@ -593,7 +597,7 @@ > unsigned char map[SYN_MAX_BUTTONS + 1]; > int i; > >- DBG(3, ErrorF("Synaptics DeviceInit called\n")); >+ DBG(7, ErrorF("Synaptics DeviceInit called\n")); > > for (i = 0; i <= SYN_MAX_BUTTONS; i++) > map[i] = i; >@@ -1192,6 +1196,7 @@ > default: > break; > } >+ > if (moving_state && !priv->palm && > !priv->vert_scroll_on && !priv->horiz_scroll_on && !priv->circ_scroll_on) { > delay = MIN(delay, 13); >@@ -1357,16 +1362,41 @@ > } > } > if (!priv->circ_scroll_on) { >- if ((para->scroll_dist_vert != 0) && (edge & RIGHT_EDGE)) { >- priv->vert_scroll_on = TRUE; >- priv->scroll_y = hw->y; >- DBG(7, ErrorF("vert edge scroll detected on right edge\n")); >- } >- if ((para->scroll_dist_horiz != 0) && (edge & BOTTOM_EDGE)) { >- priv->horiz_scroll_on = TRUE; >- priv->scroll_x = hw->x; >- DBG(7, ErrorF("horiz edge scroll detected on bottom edge\n")); >- } >+ switch (para->scroll_two_fingers) { >+ case 0: if ((para->scroll_dist_vert != 0) && (edge & RIGHT_EDGE)) { >+ priv->vert_scroll_on = TRUE; >+ priv->scroll_y = hw->y; >+ DBG(7, ErrorF("vert edge scroll detected on right edge\n")); >+ } >+ if ((para->scroll_dist_horiz != 0) && (edge & BOTTOM_EDGE)) { >+ priv->horiz_scroll_on = TRUE; >+ priv->scroll_x = hw->x; >+ DBG(7, ErrorF("horiz edge scroll detected on bottom edge\n")); >+ } >+ break; >+ case 1: if ((para->scroll_dist_horiz != 0) && (hw->numFingers > 1)) { >+ priv->horiz_scroll_on = TRUE; >+ priv->scroll_x = hw->x; >+ DBG(7, ErrorF("horizontal two-finger scroll detected\n")); >+ } >+ break; >+ case 2: if ((para->scroll_dist_vert != 0) && (hw->numFingers > 1)) { >+ priv->vert_scroll_on = TRUE; >+ priv->scroll_y = hw->y; >+ DBG(7, ErrorF("vertical two-finger scroll detected\n")); >+ } >+ break; >+ case 3: if (((para->scroll_dist_vert != 0) >+ || (para->scroll_dist_horiz != 0)) && (hw->numFingers > 1)) { >+ priv->horiz_scroll_on = TRUE; >+ priv->scroll_x = hw->x; >+ priv->vert_scroll_on = TRUE; >+ priv->scroll_y = hw->y; >+ DBG(7, ErrorF("bi-directional two-finger scroll detected\n")); >+ } >+ break; >+ default: break; >+ } > } > } > { >@@ -1377,11 +1407,21 @@ > DBG(7, ErrorF("cicular scroll off\n")); > priv->circ_scroll_on = FALSE; > } >- if (priv->vert_scroll_on && (!(edge & RIGHT_EDGE) || !finger)) { >+ >+ if ((priv->vert_scroll_on || priv->horiz_scroll_on) >+ && (hw->numFingers < 2) && para->scroll_two_fingers) { >+ DBG(7, ErrorF("two fingers scroll off\n")); >+ priv->horiz_scroll_on = FALSE; >+ priv->vert_scroll_on = FALSE; >+ } >+ >+ if (priv->vert_scroll_on && (!(edge & RIGHT_EDGE) || !finger) >+ && !(para->scroll_two_fingers > 1)) { > DBG(7, ErrorF("vert edge scroll off\n")); > priv->vert_scroll_on = FALSE; > } >- if (priv->horiz_scroll_on && (!(edge & BOTTOM_EDGE) || !finger)) { >+ if (priv->horiz_scroll_on && (!(edge & BOTTOM_EDGE) || !finger) >+ && !(para->scroll_two_fingers == 1 || para->scroll_two_fingers == 3)) { > DBG(7, ErrorF("horiz edge scroll off\n")); > priv->horiz_scroll_on = FALSE; > } >diff -Naur synaptics-0.14.4/synaptics.h synaptics-0.14.4-1/synaptics.h >--- synaptics-0.14.4/synaptics.h 2005-11-05 21:59:23.000000000 +0100 >+++ synaptics-0.14.4-1/synaptics.h 2006-03-15 04:05:00.000000000 +0100 >@@ -60,6 +60,7 @@ > emulate a middle button press. */ > int scroll_dist_vert; /* Scrolling distance in absolute coordinates */ > int scroll_dist_horiz; /* Scrolling distance in absolute coordinates */ >+ int scroll_two_fingers; /* Scroll using two fingers */ > double min_speed, max_speed, accl; /* movement parameters */ > int edge_motion_min_z; /* finger pressure at which minimum edge motion speed is set */ > int edge_motion_max_z; /* finger pressure at which maximum edge motion speed is set */ >diff -Naur synaptics-0.14.4/synclient.c synaptics-0.14.4-1/synclient.c >--- synaptics-0.14.4/synclient.c 2005-11-05 21:59:23.000000000 +0100 >+++ synaptics-0.14.4-1/synclient.c 2006-03-15 03:19:49.000000000 +0100 >@@ -63,6 +63,7 @@ > DEFINE_PAR("EmulateMidButtonTime", emulate_mid_button_time, PT_INT, 0, 1000), > DEFINE_PAR("VertScrollDelta", scroll_dist_vert, PT_INT, 0, 1000), > DEFINE_PAR("HorizScrollDelta", scroll_dist_horiz, PT_INT, 0, 1000), >+ DEFINE_PAR("TwoFingerScroll", scroll_two_fingers, PT_INT, 0, 3), > DEFINE_PAR("MinSpeed", min_speed, PT_DOUBLE, 0, 1.0), > DEFINE_PAR("MaxSpeed", max_speed, PT_DOUBLE, 0, 1.0), > DEFINE_PAR("AccelFactor", accl, PT_DOUBLE, 0, 0.2),
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 132959
:
86576
| 86577