Re: [AD] Fwd: Submission: XInput2 patch for linux mouse-movement |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Phelius <project.phelius@xxxxxxxxxx>, allegro-developers@xxxxxxxxxx
- Subject: Re: [AD] Fwd: Submission: XInput2 patch for linux mouse-movement
- From: SiegeLord <siegelordex@xxxxxxxxxx>
- Date: Wed, 23 Mar 2016 20:43:02 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=Lv+bkwZpyIM8rSyrW7E5OBWo5ghpLRjSFBqRTEKRW7g=; b=PQXPRVtfYrsOVZC6hf5tx7XUQ+eZ+uLuqMMvi8bZPTt/TKe+Uu8/Co27y3Z8oSUJs3 OmL7hsfsXpEtKHtiK+SpP5B1b5Hq73Wk/HDOlX6C14vDtVLtWk5Pg16RbGMdigQhH0nu 1Poi6gZXnNbXBYv0wjvrDuZnpiiahq7uOjFVNWp1sn1EhlFfVpPEbNDDyhRQYKCUGq0h guODClXqGDFqqQVJfC2L5VCJw/Dgwwp6CGTx3dDvm1vayHTHXhE3jmrrzhdSAy9JLAcO xbDARJjLeYOlE5meq8jLXm7UKKUwoJCDs1JH7ew+Km7KDwrUqkxlH0aeeSFxnYv1nE9o q3vA==
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
Allegro-developers@xxxxxxxxxx
https://mail.gna.org/listinfo/allegro-developers