mike-fabian / ibus-typing-booster

ibus-typing-booster is a completion input method for faster typing
https://mike-fabian.github.io/ibus-typing-booster/
Other
232 stars 16 forks source link

Typing Return or KP_Enter inside a preëdit is buggy on Fedora 35 Gnome Wayland #222

Closed mike-fabian closed 3 years ago

mike-fabian commented 3 years ago

The problem occurs only on Fedora 35 Gnome Wayland, it does not happen on Fedora 35 Gnome Xorg. On Fedora 34 it works both on Gnome Wayland and Gnome Xorg.

I found the problem when testing with these versions:

Fedora-Workstation-Live-x86_64-35-20210814.n.0.iso

[mfabian@fedora ~]$ rpm  -q ibus
ibus-1.5.24-13.fc35.x86_64
[mfabian@fedora ~]$ cat /etc/fedora-release 
Fedora release 35 (Thirty Five)
[mfabian@fedora ~]$ rpm  -q gnome-shell
gnome-shell-41~beta-1.fc35.x86_64
[mfabian@fedora ~]$ rpm  -q gedit
gedit-41~alpha-1.fc35.x86_64
[mfabian@fedora ~]$ 
mike-fabian commented 3 years ago

When typing Return inside a preëdit, the result should be that the preëdit is committed and split over two lines at the cursor position and the cursor should then be at the beginning of the second line.

mike-fabian commented 3 years ago

https://user-images.githubusercontent.com/2330175/130210826-62a0147a-2b35-4e56-b452-d287d2f33fcb.mp4

mike-fabian commented 3 years ago

What actually happens on Fedora 35 Gnome Wayland can be seen in the above video:

When typing Return while inside a preëdit, the preëdit is sometimes split over two lines (as it snould!) and sometimes it is not split over two lines.

What is even worse, is that after that en endless series of Left key events seems to occur until the cursor hits the beginning of the buffer!

Clicking with the mouse to put the cursor to the end of the buffer doesn’t stop this, the endless amount of Left key events still happening rushes the cursor back to the beginning of the buffer.

ibus-typing-booster doesn’t even see all these Left key events at all, they don’t come into do_process_key_event().

Typing something again stops the Left key events from happening and one can try again.

mike-fabian commented 3 years ago

I improved the implementation to avoid interspersing commits with forwarding key events. This makes it work even on Gnome Wayland in F35:

https://user-images.githubusercontent.com/2330175/130232202-ffab6a09-3550-4cd3-86c8-f47c58e7e7eb.mp4