[PATCH 17/37] misc: Fold together some redundant conditionals

Julien Cristau jcristau at debian.org
Wed Oct 8 17:04:12 PDT 2014


On Wed, Oct  8, 2014 at 17:04:41 +0200, Adam Jackson wrote:

> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
>  dix/window.c   | 39 ++++++++++++++++++---------------------
>  mi/mioverlay.c |  4 ----
>  mi/miwindow.c  | 32 +++++++++++++++-----------------
>  3 files changed, 33 insertions(+), 42 deletions(-)
> 
> diff --git a/dix/window.c b/dix/window.c
> index 7a2866a..99024de 100644
> --- a/dix/window.c
> +++ b/dix/window.c
> @@ -2059,10 +2059,10 @@ ReflectStackChange(WindowPtr pWin, WindowPtr pSib, VTKind kind)
>          if (anyMarked) {
>              (*pScreen->ValidateTree) (pLayerWin->parent, pFirstChange, kind);
>              (*pScreen->HandleExposures) (pLayerWin->parent);
> +            if (pWin->drawable.pScreen->PostValidateTree)
> +                (*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange,
> +                                              kind);
>          }
> -        if (anyMarked && pWin->drawable.pScreen->PostValidateTree)
> -            (*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange,
> -                                          kind);
>      }
>      if (pWin->realized)
>          WindowsRestructured();

seems weird to use pScreen in most places but pWin->drawable.pScreen in
the conditional...

Either way,
Reviewed-by: Julien Cristau <jcristau at debian.org>
for 10-17.

Cheers,
Julien


More information about the xorg-devel mailing list