OLE clipping

Mike Hearn m.hearn at signal.qinetiq.com
Fri May 16 10:51:10 CDT 2003

Hmmm, as a follow up, changing 

if ((flags & DCX_CLIPCHILDREN) && (mode != ClipByChildren))


if (flags & DCX_CLIPCHILDREN)  

in get_visible_region fixes it. I assume altering the assignment in
GetDC would have the same effect. 

I think this is what you were talking about earlier with Wine vs X11
clipping.... it seems in this case leaving it up to X doesn't work. I
don't understand enough about this area to submit a proper patch though,
so I just thought I'd let you know what change fixed the problem.

thanks -mike

On Fri, 2003-05-16 at 16:10, Mike Hearn wrote:
> > Yes I know what you talking about. Here is a patch for this. When I
> > presented it to Alexandre a while ago he said that it's not necessary
> > because X will take care of the clipping for us. He said we don't need
> > to do it.
> Thanks for the patch. I applied it, but other than the Google "I'm
> feeling lucky" buttons now appearing when i mouse over them, not much
> changed (clip_children is being called now though).
> Here's an excerpt from a trace:
> trace:x11drv:X11DRV_Expose win 0x10025 (4000009) 227,463 365x91
> trace:x11drv:X11DRV_Expose win 0x1002d (400002a) 227,0 365x40
> trace:x11drv:X11DRV_CreateBitmap (0xc18) 365x91 24 bpp
> trace:x11drv:X11DRV_GetDC visible=1
> trace:x11drv:clip_children called for parent=1002d, last=0
> trace:x11drv:get_visible_region top=0x1002a, win->hwndSelf=0x1002d
> trace:x11drv:get_visible_region WS_CLIPSIBLINGS for child
> trace:x11drv:clip_children called for parent=1002a, last=1002d
> trace:x11drv:clip_children one
> trace:x11drv:clip_children two
> trace:x11drv:get_visible_region WS_CLIPSIBLINGS for child
> trace:x11drv:clip_children called for parent=10029, last=1002a
> trace:x11drv:clip_children one
> trace:x11drv:clip_children two
> And the window tree looks like this:
> 10025 (main window - java renders buttons etc direct to it)
>   |-10029 (start of IE embedding?)
>       |- 1002A
>            |- 1002D (this seems to be the IE rendering area)
>   |-10026 (not sure what this is)
> So, As you can see Expose events are sent to the main window and the
> embedded IE window, which makes sense. I can see the clip_children call
> seemingly chaining up the window tree - it starts at 1002D and ends up
> at 10029 near the top, BUT for some reason clip_children is never called
> with a parent of 10025. 
> I'm pretty lost in this code, I'm not sure how Java is even drawing - I
> switched off the blitting code and it mangled most Wine graphics in
> other apps, but Java was just like normal. But I think maybe
> clip_children should be called for the top level window?
> thanks a lot for you help Ulrich, it's appreciated!
> -mike
Mike Hearn <m.hearn at signal.qinetiq.com>
QinetiQ - Malvern Technology Center

More information about the wine-devel mailing list