Clipping regions on windows and Expose Xevents issue

Alexandre Julliard julliard at
Thu Mar 13 06:22:00 CDT 2008

"Ann & Jason Edmeades" <us at> writes:

> 1. MoveWindow doesn't update the DCEx clip_region region, and hence when the
> visible region changes, it is merged with the clip region and since there is
> no overlap the visible region is empty so all subsequent processing ends.
> Q: Whats the best way to handle that - I was tempted to reset the
> clip_region to the visible_region (as MSDN sort of implies - you cant really
> query them so tests don't help much here) in a movewindow call

You can query the visible region, so with well-chosen dimensions and
clip region it shouldn't be too hard to write test cases. Make sure you
test both GetDCEx with an explicit clip region and BeginPaint, the
behavior is probably different

> Q: This is getting way outside my understanding of X events, but shouldn't
> the Expose event for the child (popup) window be processed before returning
> from CreateWindow with style WS_VISIBLE?

The way we hack around the asynchronous events is by checking for expose
events in UpdateWindow, but of course if the app doesn't even use that
it won't help. And on a slow connection the expose events will always
arrive too late anyway. We'd need to explicitly wait for the event, but
that would hurt badly on slow connections.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list