ibus / ibus

Intelligent Input Bus for Linux/Unix
https://github.com/ibus/ibus/wiki
GNU Lesser General Public License v2.1
877 stars 180 forks source link

When committing something and then sending a space by returning False, the commit and the space are reversed #2601

Closed mominul closed 10 months ago

mominul commented 10 months ago

Which distribution and version?: Fedora release 39 (Thirty Nine)

Which desktop environment and version?: GNOME 45.2

Which session type?: Wayland

Which application and version?:

IBus version?: IBus 1.5.29-rc2

Issue description:

I am the developer of OpenBangla Keyboard. When committing something and then sending a space by returning False, the commit and the space are reversed, but it doesn't occur every time. Here is the bug report from my project OpenBangla/OpenBangla-Keyboard#360

I am quite sure it's a race issue between the ibus engine and the client, as the related issues indicate that: https://bugzilla.redhat.com/show_bug.cgi?id=2013610

1847

I have tried using the ibus_engine_forward_key_event() function while consuming the space key, but it results in no change in behavior.

And the API docs don't have the recent API additions so I am having problems to solve it.

Thanks in advance!

fujiwarat commented 10 months ago

It would be a GNOME Wayland issue and I asked @mike-fabian to identify the problem patch in gnome-shell and mutter and we wait for the task.

fujiwarat commented 10 months ago

Deleted a bad workaround.

fujiwarat commented 10 months ago

Also you should not use ibus_engine_forward_key_event() to commit characters in text. The forwarding key event does not ensure the committing order.

mike-fabian commented 10 months ago

Also you should not use ibus_engine_forward_key_event() to commit characters in text. The forwarding key event does not ensure the committing order.

The problem occurs the same way whether return False or forward_key_event() is used. I.e. avoiding forward_key_event() and using return False instead does not help.

mike-fabian commented 10 months ago

This is the mutter bug: https://gitlab.gnome.org/GNOME/mutter/-/issues/3090

fujiwarat commented 10 months ago

The problem occurs the same way whether return False or forward_key_event() is used. I.e. avoiding forward_key_event() and using return False instead does not help.

I always answered that issue above and please don't confuse the issue instead of investigating the problem patch.