Clipping regions on windows and Expose Xevents issue

Alexandre Julliard julliard at winehq.org
Fri Mar 14 08:27:48 CDT 2008


"Ann & Jason Edmeades" <us at edmeades.me.uk> writes:

> The difficulty here is the inability to directly query the concealed (within
> the struct DCE) clip_rgn not the visible region. For example, GetClipRgn
> returns dc->hClipRgn, whereas the dce clip_rgn is internal to user32
> painting.c. The only call I can see replaces the region with GetDCEx? 
>
> What kind of test did you have in mind - The only idea I had was something
> like CreateWindow at 100,100, begin paint, MoveWindow to 50,50, FillRect
> into red, endpaint, then read it back to see if it really is read?

No, nothing like that. You could create say a 100x100 window, a 50x50
region, do GetDCEx with that clip region, then move/resize the window
and check how the DC visible region changes. Then the same thing with
InvalidateRgn+BeginPaint instead of GetDCEx.

> The app is processing in a WM_LBUTTONDOWN, and just creates a window and
> draws to it immediately, and the windows message loop wont redraw it. Is
> there any workaround for this or is it going to be an impossibility to get
> it working? (I wondered, for example, if we can do anything about ignoring
> the first expose if the window was created as visible, or removing the
> rdw_erase if the window had explicitly painted itself before the first
> event)?

We can't know if the app has painted itself, it's quite possible that
the window wasn't mapped yet when it painted, since this can be
intercepted by the window manager. We'd have to buffer the output in a
pixmap before the first expose event.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list