XI2 DirectInput mouse implementation RFC

Paul TBBle Hampson Paul.Hampson at Pobox.com
Sun Apr 19 00:52:51 CDT 2009


I've thrown together a rather-rough-but-working-in-a-limited-sense
implementation of XInput2-based DirectInput.

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 check for XInput2.h, so won't build without it.
* Doesn't send mouse-ups. XI2 bug.
* Doesn't send events after mouse-down until after mouse-up on a window.
  I'm pretty sure this is an XI2 bug, but it might be a design feature.
* Doesn't support exclusive mode. XI2 bug (grabs not yet implemented)
* Mouse buttons aren't remapped nicely downwards.
  Need to look harder at this, my mouse reports buttons 1, 2, 3, 4, 5,
  8 and 9 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.
* Only supports the Mouse. Adding keyboard support should be really
  trivial compared to actually getting the framework right.

If this format is fine, then the first patch is basically ready to go,
the latter two patches may need to be re-split or merged more sensibly.

I've also attached a couple of fixes for the XI2 stuff if anyone wants
to try it. One only affects 64-bit builds, and one fixes XCB locking
assertions which you could probably otherwise ignore. So they're both
kinda option in the Wine context.

And one more patch, against the xinput utility from whot's git tree, to
fix a compile failure.

0001-Unlock-display-after-XIQueryVersion.patch > libXi
0001-Clear-definitions-of-X-types-defined-to-wire-types.patch > x11proto-input
0001-Ensure-we-have-a-definition-of-BYTE.patch > xinput

-- 
Paul "TBBle" Hampson, Paul.Hampson at Pobox.com

Shorter .sig for a more eco-friendly paperless office.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-dinput-Seperate-mouse-and-keyboard-driver-lists.patch
Type: text/x-diff
Size: 6815 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090419/70945c31/attachment-0006.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-gdimouse-framework-in-place.patch
Type: text/x-diff
Size: 33973 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090419/70945c31/attachment-0007.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Implement-gdimouse-handler-as-best-as-I-can.patch
Type: text/x-diff
Size: 8398 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090419/70945c31/attachment-0008.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Clear-definitions-of-X-types-defined-to-wire-types.patch
Type: text/x-diff
Size: 657 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090419/70945c31/attachment-0009.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Ensure-we-have-a-definition-of-BYTE.patch
Type: text/x-diff
Size: 554 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090419/70945c31/attachment-0010.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Unlock-display-after-XIQueryVersion.patch
Type: text/x-diff
Size: 834 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090419/70945c31/attachment-0011.patch>
-------------- 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/20090419/70945c31/attachment-0001.pgp>


More information about the wine-devel mailing list