Skip to content

wayland: Ignore text_input requests from unfocused clients

Carlos Garnacho requested to merge wip/carlosg/text-input-ignore-unfocused into main

This is what the protocol says we should do, and even though normally an out of focus client should not have any reason to create IM requests, there is a bit of a grey area around focus changes, as both the client losing focus and the client gaining focus may respectively try to disable/enable in an undetermined order.

Anyways, since in that situation the client losing focus is not aware of the requests being ignored, the serial should always be incremented in order not to break accounting of .done/.commit for that specific client.

Fixes the IM focus being possibly "lost" after changing focus between clients, if the race condition turned the odds in that direction.

Merge request reports