I just start a xterm and in this xterm I start realplay. If I close the RealPlayer, the xterm doesn't get the focus as usual. Alt-Tab doesn't work in this state, either. There's the same effect if I close the window with window manager functions or with application functions. I use current stable version from CVS (xfce_4_0 branch).
I can reproduce the problem, but fixing it is a bit more tricky. Realplayer is a closed source application that tries to manipulate the focus by itself.
Just tried with metacity, that shows the exact same behaviour. It's not specific to xfwm4 then.
Fixing this particular issue breaks multiscreen (not xinerama) focus management. I think realplay should not manage focus by itself. The bug is partially fixed however as focus is now returned to xfwm4 so that alt+tab works and restore proper focus. Thanks for pointing this out. Olivier.
mass stale bug cleanup - reopen if closed in error
In 4.0.5, the Alt-Tab doesn't work after closing the realplayer.
yes, it's like that, sorry. Realplayer is a closed source application, there is not much I can do about that.
Yes, the fact that the focus is not returend to a window is Ok. But you said "The bug is partially fixed however as focus is now returned to xfwm4 so that alt+tab works and restore proper focus." and according to my tests this was the case in a CVS version. So it might be possible to return to that version.
Nope, focus management has changed a lot since then (because of gtk-2.4 and the way it manages non focusable windows), xfwm4 now "notifies" the app that it should take focus but doesn't enfoce it (ie it doesn't necessarily set input focus) - The app may not take this into account, and the WM has no way to tell. So, it's a non fix issue...
I understand. But just for interest: What has this to do with Alt-Tab?
Simple: When the focus is lost it returns to None. And xfwm4 needs to grab the keys to be able to apply keys shortcuts, so when focus is lost, there is not active grab... xfwm4 (like any other WM) keeps track of focus changes and fallbacks to its own internal window when no other window has focus. Unfortunately, some apps can confuse the WM and the fallback window doesn't receive the focus, thus the key shortcuts don't work anymore...
Sounds like this could be closed as a won't_fix issue.
Perldude tell me this doesn't happen with a new HelixPlayer based RealPlayer. Sounds like a good opportunity to close this ;)
It's really a realplayer issue, nothing we can do about it.