summaryrefslogtreecommitdiff
path: root/xserver/composite
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2018-02-18 17:16:39 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2018-02-18 17:16:39 +0000
commit59f36f1072242e554a7d6d64138db12b321a86bf (patch)
tree2a157e8f9e17d04bc4e0efde0ca7e9db5346cc37 /xserver/composite
parent1d0ff518f50b7e33f90ad75637db6090055f2d96 (diff)
Update to xserver 1.19.6. bug fix release
Diffstat (limited to 'xserver/composite')
-rw-r--r--xserver/composite/compositeext.h2
-rw-r--r--xserver/composite/compwindow.c9
2 files changed, 4 insertions, 7 deletions
diff --git a/xserver/composite/compositeext.h b/xserver/composite/compositeext.h
index b96cb1d68..5aad0735e 100644
--- a/xserver/composite/compositeext.h
+++ b/xserver/composite/compositeext.h
@@ -39,6 +39,8 @@ extern _X_EXPORT Bool CompositeRegisterImplicitRedirectionException(ScreenPtr pS
VisualID parentVisual,
VisualID winVisual);
+
+extern _X_EXPORT Bool compIsAlternateVisual(ScreenPtr pScreen, XID visual);
extern _X_EXPORT RESTYPE CompositeClientWindowType;
#endif /* _COMPOSITEEXT_H_ */
diff --git a/xserver/composite/compwindow.c b/xserver/composite/compwindow.c
index bcd230c37..f88238146 100644
--- a/xserver/composite/compwindow.c
+++ b/xserver/composite/compwindow.c
@@ -320,18 +320,13 @@ compClipNotify(WindowPtr pWin, int dx, int dy)
}
}
-/*
- * Returns TRUE if the window needs server-provided automatic redirect,
- * which is true if the child and parent aren't both regular or ARGB visuals
- */
-
-static Bool
+Bool
compIsAlternateVisual(ScreenPtr pScreen, XID visual)
{
CompScreenPtr cs = GetCompScreen(pScreen);
int i;
- for (i = 0; i < cs->numAlternateVisuals; i++)
+ for (i = 0; cs && i < cs->numAlternateVisuals; i++)
if (cs->alternateVisuals[i] == visual)
return TRUE;
return FALSE;