user202729 / ibus-plover-engine

Plover remote control engine for IBus
GNU General Public License v3.0
1 stars 0 forks source link

Focus change may not be recognized by IBus #1

Open user202729 opened 3 years ago

user202729 commented 3 years ago

... until a key is pressed (either by the user or by Plover)

Especially bad for the add translation window.

Should be fixable without too much difficulty... at least on X. Although it doesn't feel like the correct way.

Not if xdotool does not work? Is this a race condition? TODO

user202729 commented 3 years ago

Clarification:

For example, open a xterm window (A) and a Firefox window (B) in Xmonad.

Focus window A, then arrange the windows such that Super_L(j) focuses window B. Assuming {#} sends with xinput.

user202729 commented 3 years ago

A worse case is when backspace does not register.

Because get_surrounding_text works, IBus thinks that delete_surrounding_text would also work, and use it. (which does nothing)

user202729 commented 3 years ago

As a workaround it's possible to send {#shift} after add-translation popup/etc. (must be by xinput/xtest)

Although this probably won't fix the delete surrounding issue. The only way to fix that one might be always explicitly send backspaces, unfortunately.