On Sun, Feb 20, 2011 at 07:19:20PM -0600, [email protected] wrote:
> From: Chris Bagwell <[email protected]>
>
> PROTOCOL_GENERIC devices send "pad" buttons along
> with touchscreen/touchpad events. Since we are
> emulating "pad" device concept, we need to let
> "pad" events go through when "touch" is disabled.
>
> There seems to be a popular script floating around
> that toggles "touch" device on/off by using
> same devices "pad" buttons. This patch allows that
> to work again.
>
> Signed-off-by: Chris Bagwell <[email protected]>
> ---
merged, thanks. sorry about the delay.
Cheers,
Peter
> src/wcmUSB.c | 29 +++++++++++++++--------------
> 1 files changed, 15 insertions(+), 14 deletions(-)
>
> diff --git a/src/wcmUSB.c b/src/wcmUSB.c
> index 4aae452..cb7bf6b 100644
> --- a/src/wcmUSB.c
> +++ b/src/wcmUSB.c
> @@ -1312,10 +1312,6 @@ static void usbDispatchEvents(InputInfoPtr pInfo)
> }
> }
>
> - /* don't send touch event when touch isn't enabled */
> - if ((ds->device_type == TOUCH_ID) && !common->wcmTouch)
> - return;
> -
> /* DTF720 and DTF720a don't support eraser */
> if (((common->tablet_id == 0xC0) || (common->tablet_id == 0xC2)) &&
> (ds->device_type == ERASER_ID))
> @@ -1329,18 +1325,23 @@ static void usbDispatchEvents(InputInfoPtr pInfo)
> if (!ds->proximity)
> private->wcmLastToolSerial = 0;
>
> - /* dispatch events */
> - if (channel_change ||
> - (private->wcmBTNChannel == channel && btn_channel_change))
> - wcmEvent(common, channel, ds);
> -
> - /* dispatch for second finger. first finger is handled above. */
> - if (mt_channel_change)
> + /* don't send touch event when touch isn't enabled */
> + if (ds->device_type != TOUCH_ID || common->wcmTouch)
> {
> - WacomDeviceState *mt_ds;
> + /* dispatch events */
> + if (channel_change ||
> + (private->wcmBTNChannel == channel && btn_channel_change))
> + wcmEvent(common, channel, ds);
> +
> + /* dispatch for second finger.
> + * first finger is handled above. */
> + if (mt_channel_change)
> + {
> + WacomDeviceState *mt_ds;
>
> - mt_ds = &common->wcmChannel[1].work;
> - wcmEvent(common, 1, mt_ds);
> + mt_ds = &common->wcmChannel[1].work;
> + wcmEvent(common, 1, mt_ds);
> + }
> }
>
> /* dispatch butten events when re-routed */
> --
> 1.7.3.4
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel