XI2 DirectInput mouse implementation RFC (Tarballed)

Paul TBBle Hampson Paul.Hampson at Pobox.com
Mon Apr 20 10:23:05 CDT 2009

I thought I saw a reply regarding these points on the mailing list
archive, but I don't see it in my inbox.

Conveniently, I got an email from whot (XI2 developer) addressing these
points, but I haven't pulled from the updated XI2 repositories. On the
plus side the patches to XI2 that I included in my tarball should no
longer be necessary.

On Sun, Apr 19, 2009 at 06:41:34PM +1000, Paul TBBle Hampson wrote:
> It's got a fair few problems, I'm mainly interested in feedback on
> the approach, although obviously any code or style criticisms are
> welcome.

> Current limitations:
> * Doesn't send button-ups; XI2 can't distinguish button up from down

I should have been clearer. This is a bug in the libXi library, which
whot has now fixed.

> * Doesn't send events after button-down until after button-up on a window.
>   I'm pretty sure this is an XI2 bug, but it might be a design feature.

Whot said this was because clients that accept button presses cause an
implicit grab until the button is released, and this was unintentionally
blocking raw events. He'll either fix it, or already has.

> * Doesn't support exclusive mode. XI2 bug (grabs not yet implemented)
>   Hopefully this can be implemented entirely within the dinput code in
>   winex11drv (ie disabling and hiding the mouse on acquire. dinput
>   already takes care of unacquiring when we are no longer the foreground
>   app)

Whot has now implemented active grabs, but not passive grabs yet. I don't
know the difference yet, so I don't know if this is actually sufficient
for us.

> * Mouse buttons aren't remapped nicely downwards.
>   Need to look harder at this, my mouse reports buttons 1, 2, 3, 4, 5,
>   8, 9, 10, 11 and 12 under X. 4 and 5 are scroll, 6 and 7 might be
>   horizontal scroll in which case if this is always the case we can
>   just remap downwards. Might need to implement device querying to
>   confirm mouse button mapping...

Whot confirmed that this is indeed current behaviour, and will probably
remain so for legacy application support. However, XI2 supports button
label checking, so we can actually find out what each button number does
rather than hardcoding them based on these numbers.

However, the button labels themselves are not yet implemented, so for
now I won't bother querying, I'll just trust the numbers stay as they
are above.

It'll be handy for this project that my main mouse is 3-axis and has 8
buttons. Right now only the first five buttons work in Wine's DI,
according to my test program.

Paul "TBBle" Hampson, B.Sc, LPI, MCSE
Very-later-year Asian Studies student, ANU
The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361)
Paul.Hampson at Pobox.com

Of course Pacman didn't influence us as kids. If it did,
we'd be running around in darkened rooms, popping pills and
listening to repetitive music.
 -- Kristian Wilson, Nintendo, Inc, 1989

License: http://creativecommons.org/licenses/by/2.5/au/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090421/b8ecd18e/attachment.pgp>

More information about the wine-devel mailing list