-
Notifications
You must be signed in to change notification settings - Fork 46
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
Extend SDL2 platorm support (resizing + textinput) #368
Comments
This commit introduces preliminary support for using the SDL2's textinput API. So far it only has been tested with dhewm3's console where it performs adequately. Issue genodelabs#368.
Commit 745d4ae addresses the window resizing and also adds support for specifying the initial window size while 1757cda allows for handling 'SDL_TEXTINPUT` events (as is used for example by dhewm3's console). I deliberately classify the commits as preliminary as they are probably not finished (working in all cases) but are working well enough and enhance the user experience (and should not break anything while doing so). |
This commit introduces preliminary support for resizing a window. How and if it works depends to some degree on the program using the SDL2 library itself. It works well for the currently tested ports like chocolate-doom and yquake2 (software renderer). On the other hand program using an OpenGL context via SDL2 still have issues resizing the window (EGL errors). As an additional feature the commit adds support for setting the initial window geometry via the '<initial>' node, e.g.: ! <initial width="800" height="600"/> This prevents overly large windows because the actual screen size is propagated by nitpicker. Fixes genodelabs#368.
This commit introduces preliminary support for using the SDL2's textinput API. So far it only has been tested with dhewm3's console where it performs adequately. Issue genodelabs#368.
Make SDL2's textinput API more robust. We always send keyboard events if textinput has not been enabled by the application. Moreover, we only send key presses as text if the codepoint is valid and if it's not a known non-printable. Keyboard events are omitted if key presses are sent as text. This has been tested with sdl_vnc. genodelabs#368
@jschlatow thanks for the fixup commit that looks like a nice improvement indeed and works fine with |
Make SDL2's textinput API more robust. We always send keyboard events if textinput has not been enabled by the application. Moreover, we only send key presses as text if the codepoint is valid and if it's not a known non-printable. Keyboard events are omitted if key presses are sent as text. This has been tested with sdl_vnc. #368
Merged the fixup to staging. |
This commit introduces preliminary support for using the SDL2's textinput API. So far it only has been tested with dhewm3's console where it performs adequately. Issue #368.
No description provided.
The text was updated successfully, but these errors were encountered: