[PATCH] fb: Use an indirect reference to the Screen Pixmap

Daniel Stone daniel at fooishbar.org
Thu Apr 14 03:56:57 PDT 2011


Hi,

On Wed, Mar 23, 2011 at 11:40:40AM +0000, Chris Wilson wrote:
> diff --git a/fb/fbscreen.c b/fb/fbscreen.c
> index 2502efe..392de81 100644
> --- a/fb/fbscreen.c
> +++ b/fb/fbscreen.c
> @@ -87,7 +87,8 @@ _fbGetWindowPixmap (WindowPtr pWindow)
>  void
>  _fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap)
>  {
> -    dixSetPrivate(&pWindow->devPrivates, fbGetWinPrivateKey(), pPixmap);
> +    if (pPixmap != pWindow->drawable.pScreen->devPrivate)
> +	dixSetPrivate(&pWindow->devPrivates, fbGetWinPrivateKey(), pPixmap);
>  }

Don't you want something like:
    if (pPixmap == pWindow->drawable.pScreen->devPrivate)
        pPixmap = NULL;
    dixSetPrivate(&pWindow->devPrivates, fbGetWinPrivateKey(), pPixmap);
instead?

Else, AFAICT, unredirecting windows will fail as trying to change the
window pixmap from a non-screen pixmap to the screen pixmap will be a
no-op.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110414/015cac49/attachment.pgp>


More information about the xorg-devel mailing list