src/video/wayland/SDL_waylandkeyboard.c


Log

Author Commit Date CI Message
David Gow 81479d87 2022-11-18T21:08:36 wayland: keyboard: Cache text input parameters. Some applications (and embarrassingly, testime is one of them) call SDL_StartTextInput() or SDL_SetTextInputRect() every frame. On KDE/KWin with fcitx5, this causes there to be several preedit events every frame (particularly given some of the workarounds in Wayland_StartTextInput), which slows testime down to an unusable crawl. Instead, make SDL_StartTextInput() a no-op if text input is already enabled, and cache the input rect, only changing it when the new rect is actually different. With these changes, we only get preedit events (and hence SDL_TEXTEDITING events) when the preedit string actually changes. This matches the behaviour under XWayland, and works very smoothly.
Ethan Lee be2cb000 2022-10-11T11:16:52 wayland: Check for the input handle before checking the keyboard handle
rohlem b085c182 2022-07-04T16:38:05 make SDL_SetTextInputRect take a pointer to const The documentation doesn't state that the argument is ever modified, and no implementation does so currently. This is a non-breaking change to guarantee as much to callers.
Sam Lantinga adc68758 2022-06-17T10:22:28 Added SDL_copyp to avoid size mismatch when copying values (thanks @1bsyl!) Closes https://github.com/libsdl-org/SDL/pull/5811
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Sam Lantinga d95a52c9 2021-11-08T09:39:21 Fixed comment typo
Ethan Lee fc998b8e 2021-11-08T12:37:10 wayland: Return true for HasScreenKeyboardSupport only if no physical keyboard exists
Ethan Lee 74162b74 2021-07-29T13:27:31 wayland: Add support for text-input-unstable-v3
Ethan Lee eeee7308 2021-03-29T16:57:03 wayland: Implement IME support. Note that this is purely to make it possible to enter text that requires composition - for example, before this commit Kanji input didn't work at all. The big problem this still has is that we need the window position, and this is still not implemented. Once we have this information we can do the equivalent of XTranslateCoordinates to put the rectangle where we want it.