Skip to content

winemac.drv: Fix minimizing windows when Stage Manager is enabled.

On macOS, when Stage Manager is enabled, Wine windows are frozen after minimizing and restoring.

When a window is minimized in Stage Manager, [window miniaturize:] is sent, we then tell the Windows app that the minimize button was pushed, if the window wants to be minimized eventually the window style gets changed and we call [super miniaturize:] in setMacDrvState:. But macOS never seems to actually minimize the window: no windowWillMinimize or windowDidMinimize is received. Instead it's just WINDOW_LOST_FOCUS and APP_DEACTIVATED, which is the same as when Stage Manager is off and the app is just backgrounded.

It seems like clicking the yellow button sends minimize, but once the system receives that and Stage Manager is on, it's actually executed as just "put app in background".

To work around this, if Stage Manager is enabled, don't request a Windows minimize, just call up to [super miniaturize:].

Merge request reports

Loading