So I tried this on my Ubuntu and got this error:
X Error of failed request: BadValue (integer parameter out of range for
operation)
Major opcode of failed request: 132 (XInputExtension)
Minor opcode of failed request: 46 ()
Value in failed request: 0xd
Serial number of failed request: 228
Current serial number in output stream: 229
Do you know what that means?
-SL
On 03/10/2016 01:29 PM, Phelius wrote:
Attached is a patch that enables Xinput2 API for processing mouse-movement.
No new functionality is implemented.
Notes:
-I refactored/moved the x11 touch input setup stuff since it also gets
used for the mouse
-touchpad events were implemented in Xinput 2.1, but touchscreen events
are in ver 2.2
I simply made 2.2 the minimum requirement. I don't think it's worth it
to test for both versions
and it seems to be what other projects (eg: GTK) are doing.
Important:
Xorg apparently does not allow using both the legacy API and Xinput2 for
the same event class.
So enabling listening for XI_Motion events causes the
MotionNotify events to stop.
Hence, this patch _only_ grabs the mouse-movement events in Xinput2 so
that allegro has access to touchpad events we can add later in the future.
All other inputs + window + mouse events are all still being handled by
the legacy API.
Testing:
- allegro5 builds with and without xinput2 support
- mouse example programs and ALLEGRO_MOUSE_EVENT members all work for
legacy and XInput2 versions.
- pointer and mouse-wheel acceleration work for mouse and touchpad
- hot-plugging USB mouse works and simultaneous use with touchpad works
Everything behaved as expected for me.
Please review and consider for addition.
Thanks,
Pho75
_______________________________________________
Allegro-developers mailing list
[email protected]
https://mail.gna.org/listinfo/allegro-developers
_______________________________________________
Allegro-developers mailing list
[email protected]
https://mail.gna.org/listinfo/allegro-developers