On Fri, Dec 31, 2010 at 01:42:16PM -0800, ext Keith Packard wrote: > On Fri, 31 Dec 2010 16:49:37 +0200, [email protected] wrote: > > From: Ville Syrjälä <[email protected]> > > > > When SourceValidate is performed on a window with IncludeInferiors > > sub-window mode, force an immediate update of all the automatically > > redirected windows, so that the current window contents will be up > > to date. > > Reviewed-by: Keith Packard <[email protected]> > > > + pScreen->SourceValidate = cs->SourceValidate; > > + if (pDrawable->type == DRAWABLE_WINDOW && subWindowMode == > > IncludeInferiors) > > + compScreenUpdate (pScreen); > > + if (pScreen->SourceValidate) > > + (*pScreen->SourceValidate) (pDrawable, x, y, width, height, > > + subWindowMode); > > + cs->SourceValidate = pScreen->SourceValidate; > > + pScreen->SourceValidate = compSourceValidate; > > This looks a bit tricky -- unwrapping SourceValidate before calling > compScreenUpdate seems like the right order, but I wouldn't mind a nice > comment here as it's not the 'usual' order of operations for wrapping > functions.
To be honest, I didn't even think about it that much. I origianlly just duplicated the pattern from compBlockHandler(). I also used the same order of operations in the GetImage wrapper. But yeah, for SourceValidate unwrapping before updating seems like the correct order. For GetImage I suppose the order shouldn't really matter. I can add a comment to SourceValidate. But should I change the order for GetImage to do the update before unwrapping? If so, compBlockHandler could also be changed in similar fashion. -- Ville Syrjälä _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
