Open stefand opened 9 years ago
Hmm trying to test #170 - with Mint 17 I'm only running wine 1.6.2 and it seems not to work - it doesn't really even seem to be accepting keystrokes at all - I end up having to kill the wineserver process via tty. Alt-tab brings up the switcher (curiously, I have to do alt-tab-tab to make it appear), but this window remains on top of everything else, rendering things unusable.
I'll see if I can install 1.7.32+ to test (though I admit I'm a wine noob), but I'm curious if you know much about its behavior in 1.6.2?
Wine 1.6.2 doesn't implement any focus loss handling in d3d apps. The behavior you see is not entirely unexpected, although I'd expect that a blind alt-tab, followed by a ctrl+c (assuming the terminal receives focus) works, even though no immediate reaction to the alt-tab can be seen. Depends on the WM behavior a bit I guess.
A developer of Marco suggested a slightly different approach than my patch: Limit minimization without MWM_FUNC_MINIMIZE to fullscreen windows only.
Just to clarify: You won't be able to test #170 with Wine 1.6.2. It never attempts to do the minimization that fails.
I have this same problem but in a different application did you happen to find a solution?
@talon was a solution ever found for this issue?
Sine version 1.7.32 Wine handles focus loss events (usually Alt-Tab) for fullscreen Direct3D applications. The core part of this is minimizing the game's window and restoring the screen resolution to what it was before the game started. Minimizing the game's window does not work for most of the games because Muffin (just like any other Metacity fork) ignores XIconifyWindow requests on windows that do not set MWM_FUNC_MINIMIZE.
The user-visible symptom is a frozen window that does not redraw, cannot be completely minimized and cannot be restored either. For practical purposes the application the application crashes as soon as Alt-Tab is pressed. Interestingly the "Show Desktop" functionality can be used to minimize the window if the button is accessible with the frozen window on top of everything. After this the window can be restored by clicking on it in the panel and it resumes operation.
KDE, FVWM and xfwm minimize the window without issue. According to my investigations the current behavior of Wine matches that of Windows - applications without WS_MINIMIZEBOX do not have a Minimize item in their system menu, so not setting MWM_FUNC_MINIMIZE without WS_MINIMIZEBOX is the correct thing to do. Unfortunately the Motif Window Manager spec is very vague and says that window managers can do whatever they want with XIconifyWindow. The check in question was added to Metacity in 2001 by patch ec4dfd0c (git://git.gnome.org/metacity). It appears that this was a workaround against accidentally minimizing the gnome panel.
Unfortunately github does not allow me to attach any files other than pictures. I have uploaded an example Windows program that can be run with Wine here:
https://stefandoesinger.ddns.net/~stefan/minimize.c https://stefandoesinger.ddns.net/~stefan/minimize.exe (Self-signed SSL cert, and the server may be down every now and then)
The program simply fills the screen with a red color, fading to yellow, going back to red. On Alt-Tab the game should minimize. When going back to the application it should resume drawing its color. Ctrl+C it to quit.
Otherwise pretty much any Windows game can be used to reproduce the issue with Wine 1.7.32 or later. I have tested Half Life 2, Warcraft 3 and World in Conflict.