http://bugs.winehq.org/show_bug.cgi?id=23180
--- Comment #10 from Andreas Hermann Braml andreas@braml.org 2010-06-23 17:31:56 --- I'm using KWin. And this seems to be the problem.
I tried your steps with notepad on KWin (and Fluxbox's WM), and the behavior is as follows (on both of them).
1) After Ctrl+O, the 'x' of the main window is greyed out (and inactive, clicking it does nothing). 2) Esc reactivates the window controls (including the 'x') of the main window.
Just for fun, I tried TREPCAD on both Metacity and Fluxbox.
On Metacity: The main window initially doesn't have any window controls, the child window (where you select the desired type of stair) is displayed without window controls as well. When you're done with the child window, the main window should get focus (which it doesn't). As soon as I click the main window, it gets the focus, the window controls appear, including the X, which is now working as it should.
On Fluxbox: Behavior somehwere between that of Metacity and KWin. The 'X' of the main window is inactive as long as there's a child. When the main window is the last remaining window of TREPCAD, it gets the focus and the 'X' is then active. No other window controls (maximize/minimize) are ever displayed.
Does this mean that the bugs are in the WMs, not in Wine?