Dialog painting

Gerard Patel gerard.patel at nerim.net
Mon Sep 17 18:33:03 CDT 2001


At 12:35 AM 11/09/2001 +0300, you wrote:

>
>I took a closer look at this. I just ripped out the interesting parts
>from Speak freely in order to find a simple program exhibiting the
>problems. What I ended up with was a program which does nothing
>interesting except to show a simple dialg using CreateDialog(). It
>still doesn't work under Wine. The source is attached.

I have looked at your source.
With current Wine, expose X events are retrieved from the X
server when Wine has nothing else to do. These events are
setting the update region. CreateWindow does not set the
update region in current Wine, even if the window is visible.
This is the point that matters for your problem I think.

    hSplash = CreateDialog (hInstance, MAKEINTRESOURCE(IDD_SPLASH), NULL,
Splash_DlgProc);
    SetForegroundWindow(hSplash);
    // here the update region is nil (Wine problem !)
     UpdateWindow(hSplash); // --> nothing is displayed.
     Sleep(5000); // events are retrieved from the X server queue.
     printf("Removing splash.\n");
     DestroyWindow(hSplash);

Your code does not display anything because no message
is retrieved from the message queue. After the Sleep call,
WM_PAINT messages are available, but as you don't 
retrieve them by calling PeekMessage or something
like that, nothing is shown.

I don't want to say that your app code is wrong, of course.
There is a problem in Wine, but I don't know what to do
about it. My first thought would be to scan the X queue
and retrieve the expose events as was done before the
great changes of this summer, but this may be somewhat
difficult to do right.

I prefer to waste my time searching for other problems,
because I have no doubt that Alexandre Julliard is
aware of this one and it's clear that he is not finished
yet with X code reorganization.

Gerard     






More information about the wine-devel mailing list