* [PATCH] Revert "HID: magicmouse: Set multi-touch keybits for Magic Mouse"
@ 2017-06-15 12:35 Daniel Stone
2017-06-15 13:37 ` Benjamin Tissoires
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Daniel Stone @ 2017-06-15 12:35 UTC (permalink / raw)
To: linux-input
Cc: linux-kernel, Che-Liang Chiou, Thierry Escande, Jiri Kosina,
Benjamin Tissoires
Setting these bits causes libinput to fail to initialize the device;
setting BTN_TOUCH and BTN_TOOL_FINGER causes it to treat the mouse as a
touchpad, and it then refuses to continue when it discovers ABS_X is not
set.
This breaks all known Wayland compositors, as well as Xorg when the
libinput driver is being used.
This reverts commit f4b65b9563216b3e01a5cc844c3ba68901d9b195.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Cc: Che-Liang Chiou <clchiou@chromium.org>
Cc: Thierry Escande <thierry.escande@collabora.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
drivers/hid/hid-magicmouse.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
Jiri, can you please get this into 4.12 final?
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index 1d6c997b3001..20b40ad26325 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -349,7 +349,6 @@ static int magicmouse_raw_event(struct hid_device *hdev,
if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE) {
magicmouse_emit_buttons(msc, clicks & 3);
- input_mt_report_pointer_emulation(input, true);
input_report_rel(input, REL_X, x);
input_report_rel(input, REL_Y, y);
} else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
@@ -389,16 +388,16 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd
__clear_bit(BTN_RIGHT, input->keybit);
__clear_bit(BTN_MIDDLE, input->keybit);
__set_bit(BTN_MOUSE, input->keybit);
+ __set_bit(BTN_TOOL_FINGER, input->keybit);
+ __set_bit(BTN_TOOL_DOUBLETAP, input->keybit);
+ __set_bit(BTN_TOOL_TRIPLETAP, input->keybit);
+ __set_bit(BTN_TOOL_QUADTAP, input->keybit);
+ __set_bit(BTN_TOOL_QUINTTAP, input->keybit);
+ __set_bit(BTN_TOUCH, input->keybit);
+ __set_bit(INPUT_PROP_POINTER, input->propbit);
__set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
}
- __set_bit(BTN_TOOL_FINGER, input->keybit);
- __set_bit(BTN_TOOL_DOUBLETAP, input->keybit);
- __set_bit(BTN_TOOL_TRIPLETAP, input->keybit);
- __set_bit(BTN_TOOL_QUADTAP, input->keybit);
- __set_bit(BTN_TOOL_QUINTTAP, input->keybit);
- __set_bit(BTN_TOUCH, input->keybit);
- __set_bit(INPUT_PROP_POINTER, input->propbit);
__set_bit(EV_ABS, input->evbit);
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Revert "HID: magicmouse: Set multi-touch keybits for Magic Mouse"
2017-06-15 12:35 [PATCH] Revert "HID: magicmouse: Set multi-touch keybits for Magic Mouse" Daniel Stone
@ 2017-06-15 13:37 ` Benjamin Tissoires
2017-06-20 8:38 ` Jiri Kosina
2017-06-20 22:59 ` Peter Hutterer
2 siblings, 0 replies; 4+ messages in thread
From: Benjamin Tissoires @ 2017-06-15 13:37 UTC (permalink / raw)
To: Daniel Stone
Cc: linux-input, linux-kernel, Che-Liang Chiou, Thierry Escande,
Jiri Kosina
On Jun 15 2017 or thereabouts, Daniel Stone wrote:
> Setting these bits causes libinput to fail to initialize the device;
> setting BTN_TOUCH and BTN_TOOL_FINGER causes it to treat the mouse as a
> touchpad, and it then refuses to continue when it discovers ABS_X is not
> set.
>
> This breaks all known Wayland compositors, as well as Xorg when the
> libinput driver is being used.
Right. The revert is required as this is a regression.
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
However, I wonder if we should not find a better solution than having
this hybrid device that is part touchpad, part mouse.
Cheers,
Benjamin
>
> This reverts commit f4b65b9563216b3e01a5cc844c3ba68901d9b195.
>
> Signed-off-by: Daniel Stone <daniels@collabora.com>
> Cc: Che-Liang Chiou <clchiou@chromium.org>
> Cc: Thierry Escande <thierry.escande@collabora.com>
> Cc: Jiri Kosina <jkosina@suse.cz>
> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
> drivers/hid/hid-magicmouse.c | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> Jiri, can you please get this into 4.12 final?
>
> diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
> index 1d6c997b3001..20b40ad26325 100644
> --- a/drivers/hid/hid-magicmouse.c
> +++ b/drivers/hid/hid-magicmouse.c
> @@ -349,7 +349,6 @@ static int magicmouse_raw_event(struct hid_device *hdev,
>
> if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE) {
> magicmouse_emit_buttons(msc, clicks & 3);
> - input_mt_report_pointer_emulation(input, true);
> input_report_rel(input, REL_X, x);
> input_report_rel(input, REL_Y, y);
> } else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
> @@ -389,16 +388,16 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd
> __clear_bit(BTN_RIGHT, input->keybit);
> __clear_bit(BTN_MIDDLE, input->keybit);
> __set_bit(BTN_MOUSE, input->keybit);
> + __set_bit(BTN_TOOL_FINGER, input->keybit);
> + __set_bit(BTN_TOOL_DOUBLETAP, input->keybit);
> + __set_bit(BTN_TOOL_TRIPLETAP, input->keybit);
> + __set_bit(BTN_TOOL_QUADTAP, input->keybit);
> + __set_bit(BTN_TOOL_QUINTTAP, input->keybit);
> + __set_bit(BTN_TOUCH, input->keybit);
> + __set_bit(INPUT_PROP_POINTER, input->propbit);
> __set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
> }
>
> - __set_bit(BTN_TOOL_FINGER, input->keybit);
> - __set_bit(BTN_TOOL_DOUBLETAP, input->keybit);
> - __set_bit(BTN_TOOL_TRIPLETAP, input->keybit);
> - __set_bit(BTN_TOOL_QUADTAP, input->keybit);
> - __set_bit(BTN_TOOL_QUINTTAP, input->keybit);
> - __set_bit(BTN_TOUCH, input->keybit);
> - __set_bit(INPUT_PROP_POINTER, input->propbit);
>
> __set_bit(EV_ABS, input->evbit);
>
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Revert "HID: magicmouse: Set multi-touch keybits for Magic Mouse"
2017-06-15 12:35 [PATCH] Revert "HID: magicmouse: Set multi-touch keybits for Magic Mouse" Daniel Stone
2017-06-15 13:37 ` Benjamin Tissoires
@ 2017-06-20 8:38 ` Jiri Kosina
2017-06-20 22:59 ` Peter Hutterer
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2017-06-20 8:38 UTC (permalink / raw)
To: Daniel Stone
Cc: linux-input, linux-kernel, Che-Liang Chiou, Thierry Escande,
Benjamin Tissoires
On Thu, 15 Jun 2017, Daniel Stone wrote:
> Setting these bits causes libinput to fail to initialize the device;
> setting BTN_TOUCH and BTN_TOOL_FINGER causes it to treat the mouse as a
> touchpad, and it then refuses to continue when it discovers ABS_X is not
> set.
>
> This breaks all known Wayland compositors, as well as Xorg when the
> libinput driver is being used.
>
> This reverts commit f4b65b9563216b3e01a5cc844c3ba68901d9b195.
Queued for 4.12. Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Revert "HID: magicmouse: Set multi-touch keybits for Magic Mouse"
2017-06-15 12:35 [PATCH] Revert "HID: magicmouse: Set multi-touch keybits for Magic Mouse" Daniel Stone
2017-06-15 13:37 ` Benjamin Tissoires
2017-06-20 8:38 ` Jiri Kosina
@ 2017-06-20 22:59 ` Peter Hutterer
2 siblings, 0 replies; 4+ messages in thread
From: Peter Hutterer @ 2017-06-20 22:59 UTC (permalink / raw)
To: Daniel Stone
Cc: linux-input, linux-kernel, Che-Liang Chiou, Thierry Escande,
Jiri Kosina, Benjamin Tissoires
On Thu, Jun 15, 2017 at 01:35:50PM +0100, Daniel Stone wrote:
> Setting these bits causes libinput to fail to initialize the device;
> setting BTN_TOUCH and BTN_TOOL_FINGER causes it to treat the mouse as a
> touchpad, and it then refuses to continue when it discovers ABS_X is not
> set.
What happens if you set ID_INPUT_MOUSE and unset ID_INPUT_TOUCHPAD with a
udev rule/hwdb entry? I think it should work then although we'll ignore the
touch bits - that mouse would require some special handling in libinput to
expose all its features.
Cheers,
Peter
>
> This breaks all known Wayland compositors, as well as Xorg when the
> libinput driver is being used.
>
> This reverts commit f4b65b9563216b3e01a5cc844c3ba68901d9b195.
>
> Signed-off-by: Daniel Stone <daniels@collabora.com>
> Cc: Che-Liang Chiou <clchiou@chromium.org>
> Cc: Thierry Escande <thierry.escande@collabora.com>
> Cc: Jiri Kosina <jkosina@suse.cz>
> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
> drivers/hid/hid-magicmouse.c | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> Jiri, can you please get this into 4.12 final?
>
> diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
> index 1d6c997b3001..20b40ad26325 100644
> --- a/drivers/hid/hid-magicmouse.c
> +++ b/drivers/hid/hid-magicmouse.c
> @@ -349,7 +349,6 @@ static int magicmouse_raw_event(struct hid_device *hdev,
>
> if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE) {
> magicmouse_emit_buttons(msc, clicks & 3);
> - input_mt_report_pointer_emulation(input, true);
> input_report_rel(input, REL_X, x);
> input_report_rel(input, REL_Y, y);
> } else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
> @@ -389,16 +388,16 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd
> __clear_bit(BTN_RIGHT, input->keybit);
> __clear_bit(BTN_MIDDLE, input->keybit);
> __set_bit(BTN_MOUSE, input->keybit);
> + __set_bit(BTN_TOOL_FINGER, input->keybit);
> + __set_bit(BTN_TOOL_DOUBLETAP, input->keybit);
> + __set_bit(BTN_TOOL_TRIPLETAP, input->keybit);
> + __set_bit(BTN_TOOL_QUADTAP, input->keybit);
> + __set_bit(BTN_TOOL_QUINTTAP, input->keybit);
> + __set_bit(BTN_TOUCH, input->keybit);
> + __set_bit(INPUT_PROP_POINTER, input->propbit);
> __set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
> }
>
> - __set_bit(BTN_TOOL_FINGER, input->keybit);
> - __set_bit(BTN_TOOL_DOUBLETAP, input->keybit);
> - __set_bit(BTN_TOOL_TRIPLETAP, input->keybit);
> - __set_bit(BTN_TOOL_QUADTAP, input->keybit);
> - __set_bit(BTN_TOOL_QUINTTAP, input->keybit);
> - __set_bit(BTN_TOUCH, input->keybit);
> - __set_bit(INPUT_PROP_POINTER, input->propbit);
>
> __set_bit(EV_ABS, input->evbit);
>
> --
> 2.11.0
>
> --
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-20 22:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-15 12:35 [PATCH] Revert "HID: magicmouse: Set multi-touch keybits for Magic Mouse" Daniel Stone
2017-06-15 13:37 ` Benjamin Tissoires
2017-06-20 8:38 ` Jiri Kosina
2017-06-20 22:59 ` Peter Hutterer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).