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

Xonotic: unable to type text in the game's UI and console. #253

Closed
Spike29 opened this issue Jan 28, 2025 · 11 comments
Closed

Xonotic: unable to type text in the game's UI and console. #253

Spike29 opened this issue Jan 28, 2025 · 11 comments

Comments

@Spike29
Copy link

Spike29 commented Jan 28, 2025

Hello,

SDL2 has been replaced by SDL3 + sdl2-compat on Arch Linux.
Since the update, it is impossible to type text in the Xonotic UI and console, but predefined keybinds work as expected during a game.

I tried the latest official release of the game (Xonotic 0.8.6): https://xonotic.org/download/
As well as the latest nightly build: https://beta.xonotic.org/autobuild/
And a git build ;)

I don't see any errors in the terminal, and the game seems to be working fine otherwise.

EDIT: it happens with both the X11 and Wayland backends.

@NaitLee
Copy link

NaitLee commented Jan 29, 2025

Powering Xonotic is the Darkplaces engine. Its SDL input-related code is in vid_sdl.c.

In case it's helpful, Darkplaces input-related code can be seen in this diff of my commit.

Nothing can be inputted to Darkplaces console either, run a compiled engine along without any game and choose to open console, then input from keyboard may help debugging.

Reproduced on Artix Linux,

sdl3 3.2.0-1
sdl2-compat 2.30.50-1

there's no problem using sdl2.

Additionally, the problem is gone after reinstalling sdl2 (removing sdl2-compat) and running the engine without recompiling.

@Petsaka
Copy link

Petsaka commented Jan 29, 2025

Have experienced a similar problem with Grafx2, also on Arch Linux. Last evening the program was working fine, but after switching from sdl2 to sdl2-compat I could no longer input the image dimensions in the image prompt.

Otherwise the program seemed to work fine and running via terminal showed no errors. Also manually switching to sdl2 from AUR completely fixed the issue.

@levaconline
Copy link

#254

@svenstaro
Copy link

svenstaro commented Jan 29, 2025

Arch Linux SDL maintainer here. @icculus any advice/ideas about this and #255? We left the new SDL packages in testing for some time and received a bunch of sign-offs and with upstream marking the current releases as stable I thought it was safe to switch but now I'm not sure what to do with these reports coming in.

FWIW, I can reproduce the reported problem with Xonotic.

@divVerent
Copy link

Note that Xonotic never calls SDL_StartTextInput but relies on SDL_TEXTINPUT events. This isn't perfect (filed https://gitlab.com/xonotic/xonotic-data.pk3dir/-/issues/2973 to improve that), but within SDL's documented behavior:

https://wiki.libsdl.org/SDL2/SDL_StartTextInput

On desktop platforms, SDL_StartTextInput() is implicitly called on SDL window creation which will cause events SDL_TextInputEvent and SDL_TextEditingEvent to begin emitting.

Is it possible that this exact part of SDL2 isn't implemented in sdl2-compat?

@slouken
Copy link
Collaborator

slouken commented Jan 29, 2025

Arch Linux SDL maintainer here. @icculus any advice/ideas about this and #255? We left the new SDL packages in testing for some time and received a bunch of sign-offs and with upstream marking the current releases as stable I thought it was safe to switch but now I'm not sure what to do with these reports coming in.

FWIW, I can reproduce the reported problem with Xonotic.

We're working on these today. We'll ship a 2.30.51 soon with fixes for the issues coming in. Thanks!

@icculus
Copy link
Collaborator

icculus commented Jan 29, 2025

Just tried 0.8.6 with sdl2-compat, and it's working here.

Does the Arch sdl2-compat package have this patch in it? It's pretty recent.

2a9b84e

@icculus
Copy link
Collaborator

icculus commented Jan 29, 2025

Image

Image

@arc-nix
Copy link

arc-nix commented Jan 29, 2025

Just tried 0.8.6 with sdl2-compat, and it's working here.

Does the Arch sdl2-compat package have this patch in it? It's pretty recent.

2a9b84e

@icculus Arch's pkgbuild takes the source from release-2.30.50.
In this release we can see that the commit mentioned is 1 day away from the last commit of this release.

@slouken
Copy link
Collaborator

slouken commented Jan 29, 2025

Okay, it sounds like this is fixed for the next release, which will be soon.

Thanks!

@slouken slouken closed this as completed Jan 29, 2025
@slouken
Copy link
Collaborator

slouken commented Jan 29, 2025

@svenstaro, we've released sdl2-compat with the keyboard input fix:
https://github.com/libsdl-org/sdl2-compat/releases/tag/release-2.30.51

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

9 participants