Programatically minimising window gets incorrect results.

Troy Rollo wine at troy.rollo.name
Tue May 16 01:05:44 CDT 2006


The attached C sample demonstrates two problems with using 
ShowWindow(hwnd,SW_SHOWMINIMIZED) to minimise a top level window. The tests 
were done in KDE, but the second problem has been confirmed in Gnome and I 
suspect the first also occurs there.

1. If you start this program without arguments and click on the resulting
    window it will correctly minimise, but when restored it will appear with
    size 32x32 in the lower left hand corner of the screen (that is, as if it
    were still minimised as an icon).

2. If you start this program with any argument, the window will not appear
    at all. It should appear minimised.

The first problem can be fixed by the attached hack (presumably this is not 
the correct fix or even anything approximating a correct fix). The second 
seems hairier and my best guess is that it happens that way because the 
window manager has not mapped the window yet.
-- 
Troy Rollo - wine at troy.rollo.name
-------------- next part --------------
A non-text attachment was scrubbed...
Name: minimizetest.c
Type: text/x-csrc
Size: 1331 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20060516/258bcbaa/minimizetest-0001.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diffs
Type: text/x-diff
Size: 568 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20060516/258bcbaa/diffs-0001.diff


More information about the wine-devel mailing list