Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 768387 - media-libs/libsdl-1.2.15-r9: key release event while key still pressed - bug fix proposal
Summary: media-libs/libsdl-1.2.15-r9: key release event while key still pressed - bug ...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2021-02-02 16:51 UTC by Christoph Feikes
Modified: 2021-09-14 15:51 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Test program to illustrate the problem / effect of patch (SDLdemo.cpp,2.19 KB, text/x-c++src)
2021-02-02 16:52 UTC, Christoph Feikes
Details
proposed patch (FocusInOut.patch,670 bytes, patch)
2021-02-02 16:53 UTC, Christoph Feikes
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feikes 2021-02-02 16:51:19 UTC
Some time long ago there was a change in X which led to SDL
"automagically" marking keys as "released" even as they were held down
continuously. With attached 'SDLdemo.cpp' you can observe this behaviour; I
concentrated on the SHIFT keys because that especially annoyed me: I
still like to play certain old DOS pinball games, and I didn't like it
when I raised a flipper with a SHIFT key early for a drop catch, only to
see the flipper fall down before the ball even hit it.
I solved this with the attached 'FocusInOut.patch', which should remedy
unintended release events for all keys.

Reproducible: Always
Comment 1 Christoph Feikes 2021-02-02 16:52:41 UTC
Created attachment 685566 [details]
Test program to illustrate the problem / effect of patch
Comment 2 Christoph Feikes 2021-02-02 16:53:11 UTC
Created attachment 685569 [details, diff]
proposed patch
Comment 3 Ionen Wolkens gentoo-dev 2021-02-03 04:46:31 UTC
Hm, my shift keys are being held normally with that demo for as long as I hold them.

Or do you mean you want to stop key release when actually focusing out of the window? e.g. even if raising another window

If not, maybe there is something interfering? Like your window manager behavior, or original non-xfixes unclutter (just something that comes to mind, not that I have many ideas).
Comment 4 Christoph Feikes 2021-09-14 07:56:20 UTC
(In reply to Ionen Wolkens from comment #3)

Sorry it took me so long to respond! I can't reproduce the behaviour either, nowadays. When I made that patch, the shift keys got released after a short time, without a focus change to another window.
Sorry for the noise, please close the bug.
Comment 5 Ionen Wolkens gentoo-dev 2021-09-14 15:51:28 UTC
I see, no problems :)