Popup dialogs

gerard patel g.patel at wanadoo.fr.invalid
Sun Jul 22 18:22:03 CDT 2001

On Fri, 20 Jul 2001 11:12:40 -0700, Duane Clark <dclark at akamail.com>

>Prior to the major X11 changes of June, popup dialogs were nice and fast 
>(as they should be). Since the X11 changes, the popup dialogs are very 
>slow; 1-2 seconds to destroy one and pop up another on a 700MHz Athlon. 
>Actually, all window creation is much slower, but I really notice it on 
>the popup dialogs (because I use them a lot). Once the windows are open, 
>speed seems to be quite normal.

Generally speaking, I see the same thing.

However it should be noted that some applications seem
to draw as fast as before (winhelp.exe for example)

>While it is obviously a very low priority, I am hoping this is just 
>something that will be taken care of eventually, and not a permanent 
>result of the X changes? Since 1-2 seconds is a huge amount of code to 
>go through (and these are very simple dialogs - a line of prompt text 
>and a single line text edit box), there must be something very 
>inefficient going on.

Disclaimer : speculation ahead.

As far as I understand what is going on, it is clear that the
'major X11 changes' are in fact not finished.

If you look at the behaviour of the most simple Windows
program you can imagine :

hwnd = CreateWindow(...)

you will notice that after the changes, this code is no longer
working correctly. Under Windows, after UpdateWindow the
window parts that need to be redrawn have been painted.

If I stop the application at this point, I can actually see the
window completely painted (with a call to sleep() before exiting,
of course, so that it don't disappear immediately).

Under current Wine, the window is not painted.

That's because the basic window handling is wrong (IMO).

Before, showing the window would invalidate it.
Now, there is nothing that invalidates the window when
showing it; instead the code relies on waiting for X events.
In the handling of these events, the window is invalidated
and then repainted.

If I look at the window update rectangle before UpdateWindow,
I have something (the whole window rectangle, in fact) under
Window, while under Wine the update rectangle is empty.

That's why UpdateWindow does nothing in this case.

Now, it's obvious that A.Julliard know this (if I have seen
it...). And it's very unlikely that he will let things in this
(sorry) state. So more changes are to come. Will these fix
the speed problems ? Not all, since a part is coming from
the fact that Wine is now asking much more work from
the X server - if you had before one main window with
50 children, Wine was asking X to create one window,
now it will be 101.

But (hopefully) some of the excessive repainting could be 
avoided. Just don't ask me how.


More information about the wine-users mailing list