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
On Mon, Sep 17, 2001 at 11:33:03PM +0000, Gerard Patel wrote:
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.
Ok, I see. I actually did compare the messages sent in windows to those sent in wine and then I noticed, among other things, that no WM_PAINT messages were received in this case.
I don't want to say that your app code is wrong, of course.
It may very well be, but it works with real windows and some apps use constructs like this (and exhibit the same problems in wine).
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.
Well, the window needs to be painted during the first call to CreateDialog() - how to fix it is another matter. My naive idea would be to just set the invalid region manually and/or to send a WM_PAINT. Fetching expose events may also be a good idea, but I know very little about the interaction between Wine and X so I can't really say whether that is a good or a bad idea.
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.
Ok, thanks for clueing me in.
Nicke