https://bugs.kde.org/show_bug.cgi?id=525847
Bug ID: 525847
Summary: kwin resets GTK preedit hints in Wayland
Classification: Plasma
Product: kwin
Version First 6.7.5
Reported In:
Platform: Fedora RPMs
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: input
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
***
If you're not sure this is actually a bug or valid feature request, instead
post about it at https://discuss.kde.org
If you're reporting a crash, attach a backtrace with debug symbols; see
https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
Do not paste LLM output.
Please remove this comment after reading and before submitting - thanks!
***
DESCRIPTION
When I run GTK applications in Plasma KDE Wayland with IBus input-method
framework, it always reset the preedit hints by defalut, i.e. underline only.
STEPS TO REPRODUCE
1. Enable IBus Wayland in systemsettings Virtual keyboard
2. Run gnome-text-editor
3. Enable ibus-anthy and type "a" with the Hiragana mode
OBSERVED RESULT
It always show under line only in the preedit.
EXPECTED RESULT
It can show the custom preedit theme.
SOFTWARE/OS VERSIONS
Operating System (available in the Info Center app, or by running `kinfo` in a
terminal window): Fedora Linux 45
KDE Plasma Version: 6.7.5
KDE Frameworks Version: 6.30.0
Qt Version: 6.11.2
ADDITIONAL INFORMATION
GTK4 is gtk4-4.23.4-1.fc45.x86_64
When a preedit text is shown
1. kwin receives
`QtWaylandServer::zwp_input_method_context_v1::handle_preedit_styling()`
2. kwin calls `KWin::InputMethod::setPreeditStyling()` ->
`KWin::TextInputV3Interface::sendPreEditHint()` ->
`zwp_text_input_v3_send_preedit_hint()`
3. kwin receives
`QtWaylandServer::zwp_input_method_context_v1::handle_preedit_string()`
4. kwin calls `KWin::InputMethod::setPreeditString()` ->
`KWin::TextInputV3Interface::done()` -> `zwp_text_input_v3_send_done()`
5. GTK4 receives `GtkIMContextWayland::text_input_done()`
`GtkIMContextWayland` applies `pending_preedit` (current preedit style) to
`current_preedit`, and default preedit (underline only) to `pending_preedit`
here.
6. GTK4 calls `GtkIMContextWayland::commit_state()` ->.
`zwp_text_input_v3_commit()`
6. kwin receives `QtWaylandServer::zwp_text_input_v3::handle_commit()`
7. kwin calls `KWin::TextInputV3InterfacePrivate::zwp_text_input_v3_commit()`
-> `QtWaylandServer::zwp_text_input_v3::send_done()` ->
`zwp_text_input_v3_send_done()`
8. GTK4 receives `GtkIMContextWayland::text_input_done()`
`GtkIMContextWayland` applies `pending_preedit` (underline only) to
`current_preedit`.
And then GTK applications always show the default preedit hints.
Probably I think `QtWaylandServer::zwp_text_input_v3::handle_commit()` needs to
send the preedit text and style again to the text-input protocol before it
calls `zwp_text_input_v3_send_done()` when I compare the logic in kwin with
mutter.
Probably I think `kwin/src/wayland/textinput_v3_p.h:TextInputV3State` needs to
define the array of the preedit hints in pending, and
`zwp_text_input_v3_send_done()` is called only when the preedit is changed.
--
You are receiving this mail because:
You are watching all bug changes.