> -----Original Message-----
> From: gerard patel [mailto:[EMAIL PROTECTED]]
>
> As you can see (I have also added trace in XSetWindowPos),
> your last patch is doing restacking with unmapped windows :-)
> While it does not crash *my* X server, this kind of call seems
> to not produce any effect for me.
>
> In my other failing app, the problem was  similar but the app was
> trying to set a window before a combolbox (hidden, of course).
>
> The following patch fixes both my failing apps, but is it
> correct ? Probably it should be done at the X SetWindowPos
> level instead, but I'm not sure, these 'Z-order + visible' problems
> are complex :-(
>
> @@ -2737,7 +2737,7 @@
>             {
>               if (!(wndTemp->dwExStyle & WS_EX_TOPMOST))
>                 break;
> -             else
> +             else if (wndTemp->dwStyle & WS_VISIBLE)
>                {
>                 /* this is a topmost window, place the window
> after this one */
>                  hwndInsertAfter = wndTemp->hwndSelf;
>

To do it right, I think we should do the change in the X11 layer. If your
current patch is accepted, that shouldn't be too hard to do now, that you're
keeping a flag for the mapping state. When restacking the window, instead of
just checking if hwndInsertAfter is not a ZeroSized window, we could simply
check if it is map or not (using the flag you've introduced).



> OTOH, I have tried to reimplement your rejected patch on zero-size
> windows; the attached patch tries to tackle the same problem in
> the X-driver
>
> I have changed the presentation of your code because I found
> difficult to wrap
> my small brain around it and added a feature to reset the z-order
> when a window
> is reordered while not being mapped.
>
> This patch fixes my 2 not-yet-broken apps, fixes Lotus Notes,
> fixes also 2 other
> problems of managed mode (pseudotooltips of ForteFreeAgent, pseudo
> combos of the open dialog box of WordViewer 16 bits). OTOH it probably
> breaks lots of other applications :-)
>

I don't have a whole test suite of applications like you have, but your
patch is not causing any problem with the apps I'm working on. Also, I think
it is a little bit easier to read than current implementation.

        Stephane Lussier
        Macadamian Technologies

Reply via email to