https://bugs.winehq.org/show_bug.cgi?id=37937
--- Comment #12 from Stefan Dösinger stefan@codeweavers.com --- (In reply to Forest from comment #10)
I don't follow. They wait for the unminimize message even when they weren't minimized in the first place?
Yes. There are other ways to find out that the game lost focus, e.g. by listening to WM_ACTIVATEAPP messages or checking the d3d state after IDirect3DDevice9::Present. Games can in practise use way A to detect focus loss and way B to detect focus regain.
For bug 15357 and bug 18027, perhaps it would make sense to minimize on alt+tab but not when the desktop workspace is switched? That would solve the problem described in those bug reports without creating the new one described in this one.
Unfortunately d3d9 cannot separate those two cases. In both cases the window manager tells us that we have lost focus. The message wined3d receives is the same in both cases.
You could consider filing a feature request with xfce to request better isolation of workspaces and e.g. keep track of the foreground window per workspace rather than per X server. But this again has problems. E.g. games throttle their framerate on focus loss or pause the game, which may be intended behavior. I suspect the xfce devs will just tell you to run two X servers, as this will also take care of resolution differences.
Also the situation with the Linux games I tested on kde is a lot worse: With etracer or ut2004 running I can't change workspaces at all.
(In reply to Forest from comment #11)
That should have read, "Pirates doesn't support 1920x1200, but it does support > 1600x1200.
This is just another partial workaround, but it may help in a few more games: Some games are just happy with the existing 1920x1200 resolution if it is the only supported resolution. You can achieve that by setting UseXRandr and UseXVidMode to false. See http://wiki.winehq.org/UsefulRegistryKeys for more details. Of course this only works in some games - others just crash when they can't get the resolution they want.
Also I think using xrandr (or any other tool) to pre-adjust the X server's resolution before starting the game. I'll try this after my wine compile is finished.