Implicit grabs & closed windows
An implicit grab is started if you press and hold a pointer button or a keyboard key. After that, only the client will receive the subsequent events until the last button or key is released.
It works okay if the window is not closed. However, if the window is closed, it's possible to leak release events to the next client. As an example,
- open mpv and firefox(reddit)
- focus mpv and press "q"
- mpv will be closed and the keyboard focus will move to firefox
- however, you'll also see reddit's community search field focused (this should not happen)
Another problem with implicit grabs is that we have to keep it valid even if the associated window or decoration is destroyed. See !4315 (comment 746018)
Edited by Vlad Zahorodnii