Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Xi2 raw motion events when relative mouse input is enabled #1844

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.3
Reported for operating system, platform: Linux, All

Comments on the original bug report:

On 2015-04-26 15:00:31 +0000, Victor Luchits wrote:

Basically, all raw pointer events are duplicated in SDL and/or XInput2.

I'm not sure whether it is by design or not but this is clearly an undesired behaviour since it results in doubled sensitivity in games or other applications when relative mouse input is requested.

A sister bug was filed for XInput2 but never received any attention from X.org devs: https://bugs.freedesktop.org/show_bug.cgi?id=71609

On 2015-05-12 08:37:11 +0000, Victor Luchits wrote:

Proposed solution can be found here:
http://lists.libsdl.org/pipermail/sdl-libsdl.org/2015-April/000288.html

On 2015-05-12 13:04:28 +0000, Andrei Stepanov wrote:

tried it by my self http://lists.libsdl.org/pipermail/sdl-libsdl.org/2015-April/000288.html

changing True to False in X11_SetWindowGrab's X11_XGrabPointer will fix the duplicated events, but it will break mouse buttons.

though applying the second part of his solution by using tip "X11_GrabPointer inside X11_SetWIndowGrab should act the same as in X11_CaptureMouse" actually makes the proper fix for the duplicated events w/o breaking mouse buttons.

On 2015-05-14 11:44:20 +0000, Victor Luchits wrote:

Created attachment 2154
Proposed patch

As per http://lists.libsdl.org/pipermail/sdl-libsdl.org/2015-April/000288.html

Verified to work.

On 2015-05-23 16:37:14 +0000, Sam Lantinga wrote:

Fixed, thanks!
https://hg.libsdl.org/SDL/rev/c9c61d66cfa0

On 2015-06-07 21:59:56 +0000, Ryan C. Gordon wrote:

This patch caused Bug # 2996, so I've backed it out with https://hg.libsdl.org/SDL/rev/42877ed9b1c5

--ryan.

On 2015-06-08 04:49:38 +0000, Ryan C. Gordon wrote:

I don't know, I've read the passage in the XGrabPointer() documentation about owner_events about a million times now, and while I don't really know what it means, I think the initial reading of it was definitely wrong.

This definitely seems like an bug in the X server to me, but I confess that I don't really understand the problem fully.

I think we need to punt on this for 2.0.4 at this point (I thought we were simply processing core and Xinput motion events, but it turns out the server is literally sending us duplicates, which we probably can't work around).

--ryan.

On 2015-06-08 07:00:42 +0000, Ryan C. Gordon wrote:

In case this is either an x.org bug or I just can't figure out how this is meant to work, I hedged my bets with https://hg.libsdl.org/SDL/rev/957a6ed39ad0 ... now we don't change those XGrabInput() calls, but we also ignore duplicate motion events, which should hopefully make everyone happy for 2.0.4, and then we'll figure out something more proper after that.

--ryan.

On 2015-06-08 07:34:59 +0000, Victor Luchits wrote:

In Warsow we only called XIGrabDevice on slave devices. This approach didn't cause duplication of raw events but I'm not really sure it was the right kind of black magic one has to use when dealing with X11.

https://github.com/Warsow/qfusion/blob/master/source/unix/unix_input.c#L224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant