shellscript to check if window has focus, possible?
I'm playing a game through wine (fullscreen), when I alt-tab back to my ubuntu desktop, the resolution doesn't change back, but stays at the game resolution.
I'm currently using a shellscript that changes the resolution back to my origional resolution (using xrandr -s 0)
Is it possible to check which window has focus using a shellscript.
If the game doesn't have focus change resolution to my origional resolution.
|