> -----Original Message-----
> From: gerard patel [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 11, 2000 12:26 PM
>
>
> I think it could be done easily by adding a flag to either the pDriverData
> structure or using another bit in the wnd->flags word.
>
Sure it can be done that way, but this mean you will have to write some
specific code in the common layer, to get around a problem that is in the
X11 layer. Let me suggest another way of doing it, maybe we can add a
parameter to pdriver->pSetWindowPos function. This parameter could be the
Old window rect. Then If the OldWindow rect indicate a zero-sized window and
we're changing the size of the window to be different than 0, then we set
ForceMapped flag to TRUE.
> I can do it if Stephane has other things to do, but I have
> another question on the existing code - mostly aimed at Stephane
> since he wrote it, but anyone experienced in X programming could
> answer I guess.
>
Sure go ahead, do it like you think is best.
> There is this comment in the X11DRV_WND_SetWindowPos function
> (windows/wnd.c)
> that I don't understand.
>
> /* If the window where we should do the insert is
> zero-sized (not mapped)
> don't used this window since it will possibly crash
> the X server,
> use the "non zero-sized" window above */
>
> What I find strange is that in current Wine, there is no "zero-sized'
> X window. There is a hack to prevent that which is fixing the window
> dimension to 1x1. So I don't see why setting the display order should
> crash the server if a XRestackWindow is reordering an unmapped
> 1x1 window ?
> In fact, I tried to remove this special-case code altogether and
> none of my
> test apps crashes or has a regresion (IIRC I have even one
> working better).
>
The problem is not related to the fact that window is zero-sized, it is
related to the fact that the window is not mapped. I've seen X crashing big
time when calling XRestackWindow with a mapped and a non-mapped window. So
that's why I added that code.
Stephane Lussier
Macadamian Technologies