Steps to reproduce:
- Focus an input field (
yad --entry
) - Force hide panel with dbus
- Focus no input field
Actual result: panel blinks
Expected: Panel stays hidden
The reason this was glitched is that defocusing clears the temporary "force hide" flag, and hiding is animated based on defocus time.
The fix is to lie about the defocus time and push it way into the past, where the animation was already played.
An alternative fix without lying would be to remember the time of clearing the force hide, and suppressing animations if the clear time was recent enough. That's more complicated though, and the focus time is only stored for animation in the first place. Alternative fix: explicit "inactive since forever" state, but that would add extra branches in state management for little benefit.