Focus broken when current program has grabbed keyboard
Unfortunately there is an issue when xfce4-screensaver gets activated whilst an application is grabbing the keyboard. xfce4-screensaver will then fail to grab the keyboard itself, and fall back to the function gs_grab_nuke_focus()
.
So far everything is fine, but the problem comes when xfce4-screensaver is unlocked. The focus is not returned to the previous window. You also cannot click on the window to regain focus, so something is broken there as well. Override redirect windows tend to confuse the window manager, so I would suspect something there.
Applications grabbing the keyboard often do so whilst full screen, meaning you can't click on anything and often get stuck at this point.
Tested on Ubuntu 20.04 with xfce4-screensaver 0.1.10-0ubuntu1.
This issue came up together with TigerVNC: