On Thu, Mar 7, 2013 at 2:11 PM, Ping Cheng <pingli...@gmail.com> wrote:
> wcmBTNChannel was statically assigned to PAD_CHANNEL by commit 1f9bf45b,
> which
> excluded button events for CURSOR tools. This patch allows usbParseBTNEvent
> to process button events for both CURSOR and PAD tools.
>
> wcmBTNChannel is removed from wcmUSBData since we do not need it anymore.
>
> Signed-off-by: Ping Cheng <pi...@wacom.com>
> ---
> src/wcmUSB.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/src/wcmUSB.c b/src/wcmUSB.c
> index 980dac3..db7c045 100644
> --- a/src/wcmUSB.c
> +++ b/src/wcmUSB.c
> @@ -32,7 +32,6 @@
>
> typedef struct {
> int wcmLastToolSerial;
> - int wcmBTNChannel;
> int wcmDeviceType;
> Bool wcmPenTouch;
> Bool wcmUseMT;
> @@ -460,8 +459,6 @@ static void usbWcmInitPadState(InputInfoPtr pInfo)
> ds->device_type = PAD_ID;
> ds->device_id = PAD_DEVICE_ID;
> ds->serial_num = channel;
> -
> - private->wcmBTNChannel = channel;
> }
>
> int usbWcmGetRanges(InputInfoPtr pInfo)
> @@ -1651,8 +1648,12 @@ static void usbDispatchEvents(InputInfoPtr pInfo)
> }
> else if (event->type == EV_KEY)
> {
> + /* Button events can be from puck or expresskeys */
> + int btn_channel = (ds->device_type == CURSOR_ID) ?
> + channel : PAD_CHANNEL;
> +
> usbParseKeyEvent(common, event, channel);
> - usbParseBTNEvent(common, event,
> private->wcmBTNChannel);
> + usbParseBTNEvent(common, event, btn_channel);
> }
> } /* next event */
>
> --
> 1.7.10.4
>
>
>
> ------------------------------------------------------------------------------
> Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
> Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
> endpoint security space. For insight on selecting the right partner to
> tackle endpoint security challenges, access the full report.
> http://p.sf.net/sfu/symantec-dev2dev
> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>
Reviewed-by: Jason Gerecke <killert...@gmail.com>
Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one /
(That is to say, eight) to the two, /
But you can’t take seven from three, /
So you look at the sixty-fours....
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel