Patch to restore iconified window

Duane Clark dclark at akamail.com
Wed Aug 28 13:04:09 CDT 2002


Alexandre Julliard wrote:
> Duane Clark <dclark at akamail.com> writes:
> 
> 
>>Unlike most other apps, when iconified fpga_editor triggers
>>X11DRV_ShowWindow() with a cmd==SW_HIDE, to hide the window. When
>>X11DRV_MapNotify() was subsequently called, it did nothing because
>>WS_VISIBLE was not set. This patch fixes that.
>>
>>I've been using this patch with everything I run for about 5 months now.
>>
>>Log message:
>>	Fix restoring of windows that were iconified with SW_HIDE.
> 
> 
> Well, SW_HIDE is supposed to hide the window, not iconify it, so we
> are not supposed to get a MapNotify at this point. What is probably
> missing is proper handling for hiding an iconified window.
> 

More particularly, I see that the ShowWindow function in Wine first 
calls a user function and then sends the message (WM_WINE_SHOWWINDOW, 
cmd) to the window. Most apps don't seem to have a user function, so I 
guess the later message iconifies the window.

In the case of Xilinx, there is a user function that just does:

0806f758:Call window proc 0x5f401b81 
(hwnd=00010021,msg=WM_SHOWWINDOW,wp=00000006,lp=00000000)

It is within this call that the X11DRV_ShowWindow() with a cmd==SW_HIDE 
is called, which in turn calls

      trace:win:SetWindowPos hwnd 10021, after 0, 0,0 (0x0), flags 00000097
     trace:win:dump_winpos_flags flags: SWP_NOSIZE SWP_NOMOVE 
SWP_NOZORDER SWP_NOACTIVATE SWP_HIDEWINDOW
     0806f758:Call x11drv.SetWindowPos(404863c8) ret=4077aa2e

Then all this returns and Wine sends the (WM_WINE_SHOWWINDOW, cmd) 
message, which does another SetWindowPos. So the SetWindowPos command is 
sent twice, though I haven't figured out whether that is the problem.





More information about the wine-devel mailing list