forked from ghostty-org/ghostty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apprt/gtk: fundamentally rework input method handling (ghostty-org#5280)
Fixes ghostty-org#4332 This commit fundamentally reworks the input method handling in the GTK apprt, making it work properly (as reported in the linked issue) on both Wayland and X11. This was tested with both a Gnome desktop on Wayland and i3 on X11 with fcitx and mozc. The main changes are: - Both key press and release events must be forwarded to the input method. - Input method callbacks such as preedit and commit must be expected outside of keypress events to handle on-screen keyboards and non-keyboard input devices. - Input methods should always commit when told to. Previously, we would only commit when a keypress event was given. This is incorrect. For example, it didn't work with input method changes outside the app which should result in committed text (as can be seen with "official" Gnome apps like Notes or Console). The key input handling also now generally does less so I think input latency should be positively affected by this change. I didn't measure.
- Loading branch information
Showing
1 changed file
with
132 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters