[PATCH 1/2] Properly un/rewrap CreateWindow
Adam Jackson
ajax at nwnk.net
Wed Nov 18 06:39:04 PST 2009
On Wed, 2009-11-18 at 11:58 +1100, Daniel Stone wrote:
> On Tue, Nov 17, 2009 at 01:59:42PM -0500, Adam Jackson wrote:
> > static Bool
> > DUMMYCreateWindow(WindowPtr pWin)
> > {
> > DUMMYPtr dPtr = DUMMYPTR(DUMMYScrn);
> > WindowPtr pWinRoot;
> > int ret;
> > -
> > +
> > + pScreen->CreateWindow = dPtr->CreateWindow;
> > ret = dPtr->CreateWindow(pWin);
> > + pScreen->CreateWindow = DUMMYCreateWindow;
> > +
> > if(ret != TRUE)
> > return(ret);
>
> Hm, is this canon? I thought the generally-accepted way to wrap would've
> been also to set dPtr->CreateWindow = pScreen->CreateWindow after
> calling the saved function, but I could be wrong.
I guess all that gains you is that the function below you can take
itself _out_ of the wrap chain. But there is an example of this in the
code (xf86CreateRootWindow), so that's probably worth preserving.
Fixed, along with the compile bug Eamon pointed out.
- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.x.org/archives/xorg-devel/attachments/20091118/e4dfed92/attachment.pgp
More information about the xorg-devel
mailing list