[Problem report] X11DRV_GetDC

Gerard Patel gerard.patel at nerim.net
Sun Jun 24 09:04:53 CDT 2001


This problem I see with Eudora (1.5 or 3.06 - I can't see it with Eudora 4
because it crashes before :-)).

Using the option dialog box, everytime there is a checkbox or an option button, 
these buttons appear 2 times when switching from a page to another, one time
at the correct place, one time off to the left.
I think that the problem comes from the fact that the app paints outside of a
WM_PAINT event.

What happens is that when switching from a dialog 'page' to another, Eudora
creates a hidden dialog with buttons on it, initialize the controls with the
correct
values from its config file, then reparent all the controls to the main
dialog box.
The hidden dialog box is a child of the main dialog box (but on this hidden 
dialog box, the controls are not at the place where they are supposed to be on
the real dialog box).

To be clearer, we have windows as follow (in the order parent->child)

A : main dialog, style visible + clipsiblings
B : work dialog, not visible + not clipsiblings
C : a checkbox

X11DRV_GetDC finds B as top window that is not clipsibling, then Wine use as
drawable the parent of B : A. Then the checkbox is displayed somewhere on A.

The following patch works around this particular problem, but I doubt that it's
the best place to change.

And, BTW, there are many other problems in current Cvs with my toy test 
suite :-/, problems that were not here a month ago, of course. To be fair the
new code has removed *some* long standing problems, too. But on the 
balance it's still very bad.

Gerard

Index: dlls/x11drv/winpos.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/winpos.c,v
retrieving revision 1.10
diff -u -r1.10 winpos.c
--- dlls/x11drv/winpos.c        2001/06/22 03:42:27     1.10
+++ dlls/x11drv/winpos.c        2001/06/24 10:50:45
@@ -387,8 +387,11 @@
 
     /* find the top parent in the hierarchy that isn't clipping siblings */
     top = NULL;
-    for (ptr = win->parent; ptr && ptr->parent; ptr = ptr->parent)
-        if (!(ptr->dwStyle & WS_CLIPSIBLINGS)) top = ptr;
+    if (IsWindowVisible(win->hwndSelf))
+    {
+        for (ptr = win->parent; ptr && ptr->parent; ptr = ptr->parent)
+            if (!(ptr->dwStyle & WS_CLIPSIBLINGS)) top = ptr;
+    }
 
     if (!top && !(flags & DCX_CLIPSIBLINGS)) top = win;






More information about the wine-devel mailing list