Thanks for looking into this, Gerd.

On 19 January 2017 at 10:06, Gerd Hoffmann <kra...@redhat.com> wrote:

> Waded through the specs.  Setting bInterfaceProtocol to 0x00 should be
> done anyway.  Only boot protocol devices (which the tablet isn't) should
> set this to 1 (kbd) or 2 (mouse).  No need to hide that behind a macos
> option, we can do that for everybody.
>

OK, that shortens the patch considerably!


> The other one is more tricky.  Declaring the device as "mouse" is
> clearly wrong according to the specs.  There is no explicit "tablet"
> device.  "pointing" comes closest.
>


> Does the issue still show up with bInterfaceProtocol being fixed?
>

I just tested it with macOS 10.12, and yes, unfortunately it does. Or
rather, the cursor now zips off (I think) the bottom right corner of the
screen as soon as you try to move it for the first time, never to be seen
again. I don't know if the "mouse" usage is strictly correct for a tablet;
the spec does appear somewhat ambiguous on this - none of the examples it
gives for "pointer" usage seem to match Qemu's usb-tablet. It would appear
that OSX/macOS follows the following sentence from chapter 2's overview:

"For example, a gaming device driver might look for Joystick and Game Pad
usages, while a system mouse driver might look for Mouse, Digitizer Tablet
and Touch Screen usages."

Note that "Pointer" usage is not listed for the system mouse driver; I'm
not sure Digitizer Tablet and Touch Screen are any more accurate though,
considering we have more mouse-like button events.

I do know for certain that VMWare also uses 0x02 for its absolute pointing
device. WinXP, Win7, and Win10 certainly appear to have no problem with
mac_compat from my patch enabled. I haven't checked other windowing systems
yet.

(So far I've been hacking around this issue with a special guest driver,
https://github.com/pmj/QemuUSBTablet-OSX but having a workaround in
mainline Qemu would be much more convenient, particularly as it'll work
during OS install etc.)

Any thoughts on how to proceed?

Thanks,
Phil

Reply via email to