Skip to content

Fix a deadkeys glitch when using IBus input method - #1020

Draft
abnt713 wants to merge 4 commits into
elementary:mainfrom
abnt713:fix/dead-keys-workaround
Draft

abnt713 wants to merge 4 commits into
elementary:mainfrom
abnt713:fix/dead-keys-workaround

Conversation

@abnt713

@abnt713 abnt713 commented Oct 13, 2026

Copy link
Copy Markdown

There is a known bug in ibus version <1.59.30 where a dead key event get stuck in preedit state. This behavior glitches the cursor rendering.

The IBusDeadKeysPolicy address this issue by checking if the input method is ibus and resetting the cursor if necessary.

This PR fixes the issue #1015

Details for reviewers

Since the noble repository only provides ibus version 1.59.29, updating ibus for Elementary 8.1 is not an easy fix. This PR adds a specialized class to address this issue directly without overloading the TerminalWidget responsabilities.

  • The ibus issue is available here.

Discussion points

We opted to use the Policy Pattern to avoid coupling the workaround to the TerminalWidget class. Since the fix will be "short lived" and should be fixed once Elementary OS 9 is released, we added an applies method to check if the fix is relevant. But there is room for improvement:

  • The applies method could check for the ibus version exactly, but that would add another dependency for the project (IBus.IBus namespace). Do you agree with this addition?
  • Resetting the cursor is done in a "hacky" way by toggling the component focus through EventControllerFocus. I couldn't figure a better way to reset it since the required functions are all private for the VTE component. If anyone knows a better way please let me know! (Really, I would be so grateful! I tried really hard)
  • The method for fetching the EventControllerFocus iterates over all observe_controllers. If there is an easier and more linear method of fetching the controller, please let me know!

There is a known bug in ibus version <1.59.30 where a dead key event get stuck in preedit state. This behavior glitches the cursor rendering.

The IBusDeadKeysPolicy address this issue by checking if the input method is ibus and resetting the cursor if necessary.

This commit fixes the issue elementary#1015
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

Successfully merging this pull request may close these issues.

1 participant