We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3784 - SDL register event used by the window manager
Summary: SDL register event used by the window manager
Status: RESOLVED ABANDONED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 2.0.5
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-28 18:56 UTC by vincent
Modified: 2018-08-06 21:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vincent 2017-08-28 18:56:03 UTC
While polling event we receive event that should not be received by the application. For example, with my configuration, in awesome-wm Alt+Shift+Space change the layout of the windows. SDL_PollEvent return the event corresponding to the keystrokes (even the last keystroke).

Those event (at least the last keystroke of a WM shortcut) should not be given to the application. It causes, for example, a bug in a image viewer where handling the viewer's window (like moving the window) change the image displayed by the image viewer. It's caused by the fact that the shortcut for moving window use an arrow key. The arrow key is also used to change the displayed image.

It's easier to reproduce the bug in a tilling window manager (like awesomeWM or i3).
To reproduce it, create a loop that print the event polled. Use keys bound by the window manager.
All the keystroke event will be polled and printed.
The last event (or all the events) corresponding to the bounded keystroke should not appears in the polled event.
Comment 1 Sam Lantinga 2017-08-28 20:44:41 UTC
If the window manager passed the keystrokes on to the application, I'm not sure how we'd know not to interpret them. Any ideas?
Comment 2 vincent 2017-09-05 18:51:44 UTC
(In reply to Sam Lantinga from comment #1)
> If the window manager passed the keystrokes on to the application, I'm not
> sure how we'd know not to interpret them. Any ideas?

I don't know if you really can fix this issue from SDL. It may come from where the SDL poll the event (X11, ...). I don't know how the SDL work so I can't say how to fix this issue (sorry about that).

I would suggest to try to reproduce the issue with X11 (I'm guessing SDL use X11 to poll event on Linux with X11) to see if this is a SDL or X11 issue.

The issue was found while using imv (https://github.com/eXeC64/imv). An issue was filed here: https://github.com/eXeC64/imv/issues/108 .

Sorry that I can't help more.
Comment 3 Ryan C. Gordon 2018-08-06 21:20:21 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.