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

evdev touch events return NULL window #1933

Open
Jan200101 opened this issue Nov 9, 2024 · 1 comment
Open

evdev touch events return NULL window #1933

Jan200101 opened this issue Nov 9, 2024 · 1 comment
Labels
bug Something isn't working SDL

Comments

@Jan200101
Copy link
Contributor

https://github.com/libsdl-org/SDL/blob/559223ff9dbd7893ad26de5ba4d0847d758bc1e3/src/core/linux/SDL_evdev.c#L542

for evdev SDL intentionally doesn't assign a window to the touch event due to limitations with the API

in lite-xl this curently causes a crash in system.c because it attempts to find a RenWindows that doesn't exist and then performs a null dereference

How should this be handled?

Dropping the event would be the sanest, however that mean that certain, very unique setups, have absolutely no input support.

An alternative would be simply get the first window from the window list and use that

@Guldoman Guldoman added bug Something isn't working SDL labels Nov 14, 2024
@takase1121
Copy link
Member

I think getting the first window is a good enough workaround, perhaps with a warning message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working SDL
Projects
None yet
Development

No branches or pull requests

3 participants