UI regression

Duane Clark junkmail at junkmail.com
Tue Mar 5 12:46:09 CST 2002

Jon Piesing wrote:
> Duane Clark <junkmail at junkmail.com> wrote:
> : Jon Piesing wrote:
> :> 
> <snip>
> : Well, the interesting thing is that yours is also apparently an MDI 
> : application, is that right?
> I have no idea. Mine is a commercial application which only runs on
> Windows & Macintosh. It ran much better under the May 2001 snapshot of
> wine, hence the subject of this posting "UI regression".

Well, I found out how to completely fix my app. In the file 
dlls/user/painting.c in the function BeginPaint() down around line 170, 
there is this:

     if (GetClassLongA( hwnd, GCL_STYLE ) & CS_PARENTDC)
         /* Don't clip the output to the update region for CS_PARENTDC 
window */
         if (hrgnUpdate > 1) DeleteObject( hrgnUpdate );
         hrgnUpdate = 0;
         dcx_flags &= ~DCX_INTERSECTRGN;

I simply commented out the contents, and now my app works perfectly. It 
eliminates a lot of annoying redraws too.

     if (GetClassLongA( hwnd, GCL_STYLE ) & CS_PARENTDC)
         TRACE("Don't clip?\n");
         /* Don't clip the output to the update region for CS_PARENTDC 
window */
/*        if (hrgnUpdate > 1) DeleteObject( hrgnUpdate );
         hrgnUpdate = 0;
         dcx_flags &= ~DCX_INTERSECTRGN;*/

You could try that, though since your symptoms are somewhat different, I 
don't know whether it will fix it. I am going to have to spend some time 
trying to figure out what that piece of code was intended to do.

If that does not fix your app, then you can go ahead and send me a trace 
if you would like.

First apply this patch and recompile (it helps me understand what is 
going on):

Index: graphics/x11drv/clipping.c
RCS file: /home/wine/wine/graphics/x11drv/clipping.c,v
retrieving revision 1.18
diff -u -r1.18 clipping.c
--- graphics/x11drv/clipping.c  2002/01/29 03:07:21     1.18
+++ graphics/x11drv/clipping.c  2002/03/05 16:28:16
@@ -57,6 +57,8 @@
              pXr->y = pRect->top;
              pXr->width = pRect->right - pRect->left;
              pXr->height = pRect->bottom - pRect->top;
+            TRACE("start %dx%d width %d height %d\n",
+             pXr->x, pXr->y, pXr->width, pXr->height);

Then set an environment variable to reduce the amount of the trace. This 
is Yet Another Clever Lawson Suggestion (YACLS - at least I think it was 

setenv relay 

Assuming you are using bash, I guess the syntax is something like
  set relay=etc.
Now create a trace with:

--debugmsg $relay,+win,+nonclient,+clipping,+region,+x11drv app &> wine.log

That could well be 50-100MB. What I then generally do is chop it up into 
manageable pieces.

split --bytes=5m wine.log

That creates a bunch of 5MB files named xa*. Find the one where your 
loop starts, probably the last one. Make sure there are at least 10000 
or so lines before the start of the loop. Then either send me the whole 
file or chop it down a bit. Please *compress* it first! Email is fine 
(hopefully you can figure out my address from below:-) or alternatively, 
post it on the web somewhere and just post here about where it is.

My real email is akamail.com at dclark (or something like that).

More information about the wine-users mailing list