catacombing / catacomb

A Wayland Mobile Compositor
GNU General Public License v3.0
109 stars 4 forks source link

Synchronize virtual keyboard removal #118

Open chrisduerr opened 1 year ago

chrisduerr commented 1 year ago

When a new layout is selected in the application overview, the windows are resized in a transaction and the view is changed. However right after the transaction is completed the focus will be updated and the virtual keyboard will close (assuming no input is focused). As a result there's unnecessary flickering.

Generally it should be more reliable to forcefully kill the virtual keyboard when opening a layout different from the current one (see https://github.com/catacombing/catacomb/issues/117#issuecomment-1637187808).

Ideally it would be checked ahead of time if the virtual keyboard will still be open or not after the new window will be focused, but that's unlikely to be easy/possible.

chrisduerr commented 1 year ago

I've tested if clearing focus immediately on application change would fix this, instead of waiting for a redraw, but that did not work.

So this will probably require a more specialized solution, likely including some heuristics.