Compiz refuses to minimize fullscreen wine apps on focus loss

Bug #1414071 reported by Stefan Dösinger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Triaged
Medium
Unassigned

Bug Description

Since version 1.7.32 Wine minimizes fullscreen Direct3D and DirectDraw games when they lose focus (e.g. when pressing alt-tab) like Windows does. This results in an XIconifyWindow call on the application's window. Compiz partially ignores the call and puts the window in a broken state unless the application requests a minimize box on its window. Most fullscreen games do not do this because the minimize box isn't visible anyway.

This is due to an explicit check in Compiz that makes the window unminimizable even on application request if the MwmFuncIconify hint is not set. The check dates back to revision number 297 which added Motif function hint support. KWin, FVWM and XFWM minimize such a window just fine. Metacity and its forks also refuse to minimize a window without the MwmFuncIconify hint, ostensibly as a workaround against accidentally minimizing the gnome dock. Probably Compiz has simply taken over Metacity's behavior.

I am attaching a small Windows application in .c and .exe form that can be run with Wine to reproduce the bug as well as a proposed fix diff. Most D3D games show the same problem, e.g. Warcraft 3, Half Life 2, World in Conflict. Trackmania Nations sets WS_MINIMIZEBOX so it is not affected.

Unrelated to this bug Compiz occasionally crashes with SIGABRT when trying to tab away from my test application. This happens with and without my patch.

Revision history for this message
Stefan Dösinger (stefandoesinger-b) wrote :
Revision history for this message
Stefan Dösinger (stefandoesinger-b) wrote :
Revision history for this message
Stefan Dösinger (stefandoesinger-b) wrote :

This patch fixes the bug for me.

I don't know if there are any side effects beyond changing the behavior on programmatic XIconifyWindow requests. It is not my intention to show any buttons or menu entries that allow the user to request minimization. Unfortunately I could not get the window decoration plugin to work to see if a minimize button shows up incorrectly.

Stephen M. Webb (bregma)
Changed in compiz:
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.