diff mbox

HID: wacom: generic: Wacom mouse is only provided for opaque tablets

Message ID 1486509851-2977-1-git-send-email-pingc@wacom.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ping Cheng Feb. 7, 2017, 11:24 p.m. UTC
So, don't add mouse and lens cursor tools.

Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
---
 drivers/hid/wacom_wac.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Gerecke, Jason Feb. 10, 2017, 11:12 p.m. UTC | #1
On Tue, Feb 7, 2017 at 3:24 PM, Ping Cheng <pinglinux@gmail.com> wrote:
> So, don't add mouse and lens cursor tools.
>
> Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
> ---

Looks good to me!

Reviewed-by: Jason Gerecke <jason.gerecke@wacom.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....

>  drivers/hid/wacom_wac.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
> index d51daf5..b51aa27 100644
> --- a/drivers/hid/wacom_wac.c
> +++ b/drivers/hid/wacom_wac.c
> @@ -1952,8 +1952,10 @@ static void wacom_wac_pen_usage_mapping(struct hid_device *hdev,
>                 input_set_capability(input, EV_KEY, BTN_TOOL_BRUSH);
>                 input_set_capability(input, EV_KEY, BTN_TOOL_PENCIL);
>                 input_set_capability(input, EV_KEY, BTN_TOOL_AIRBRUSH);
> -               input_set_capability(input, EV_KEY, BTN_TOOL_MOUSE);
> -               input_set_capability(input, EV_KEY, BTN_TOOL_LENS);
> +               if (!(features->device_type & WACOM_DEVICETYPE_DIRECT)) {
> +                       input_set_capability(input, EV_KEY, BTN_TOOL_MOUSE);
> +                       input_set_capability(input, EV_KEY, BTN_TOOL_LENS);
> +               }
>                 break;
>         case WACOM_HID_WD_FINGERWHEEL:
>                 wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0);
> --
> 2.7.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jiri Kosina March 6, 2017, 12:22 p.m. UTC | #2
On Tue, 7 Feb 2017, Ping Cheng wrote:

> So, don't add mouse and lens cursor tools.
> 
> Signed-off-by: Ping Cheng <ping.cheng@wacom.com>

Could you please make the changelog more specific? It's not clear from it 
what kind of bug this is exactly fixing, and what are the user-visible 
effects of it (namely in relation to it's applicability to 
4.11/stable/etc).

Thanks,
diff mbox

Patch

diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index d51daf5..b51aa27 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -1952,8 +1952,10 @@  static void wacom_wac_pen_usage_mapping(struct hid_device *hdev,
 		input_set_capability(input, EV_KEY, BTN_TOOL_BRUSH);
 		input_set_capability(input, EV_KEY, BTN_TOOL_PENCIL);
 		input_set_capability(input, EV_KEY, BTN_TOOL_AIRBRUSH);
-		input_set_capability(input, EV_KEY, BTN_TOOL_MOUSE);
-		input_set_capability(input, EV_KEY, BTN_TOOL_LENS);
+		if (!(features->device_type & WACOM_DEVICETYPE_DIRECT)) {
+			input_set_capability(input, EV_KEY, BTN_TOOL_MOUSE);
+			input_set_capability(input, EV_KEY, BTN_TOOL_LENS);
+		}
 		break;
 	case WACOM_HID_WD_FINGERWHEEL:
 		wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0);