[PATCH 3/3] composite: Don't double-redirect if someone asks for backing store twice

Ville Syrjälä syrjala at sci.fi
Thu Sep 12 14:15:41 PDT 2013


On Thu, Sep 12, 2013 at 12:04:15PM -0400, Adam Jackson wrote:
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
>  composite/compinit.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/composite/compinit.c b/composite/compinit.c
> index 2001c8a..7f8d7cb 100644
> --- a/composite/compinit.c
> +++ b/composite/compinit.c
> @@ -116,10 +116,10 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
>      ret = pScreen->ChangeWindowAttributes(pWin, mask);
>  
>      if (ret && (mask & CWBackingStore)) {
> -        if (pWin->backingStore != NotUseful) {
> +        if (pWin->backingStore != NotUseful && !pWin->backStorage) {
>              compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
>              pWin->backStorage = (pointer) (intptr_t) 1;
> -        } else {
> +        } else if (pWin->backStorage) {

Shouldn't the check be
if (pWin->backingStore == NotUseful && pWin->backStorage) ?

>              compUnredirectWindow(serverClient, pWin,
>                                   CompositeRedirectAutomatic);
>              pWin->backStorage = NULL;
> -- 
> 1.8.3.1
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel

-- 
Ville Syrjälä
syrjala at sci.fi
http://www.sci.fi/~syrjala/


More information about the xorg-devel mailing list