Allow disabling the SHAPE extension at runtime

To correctly render a window making use of SHAPE, a compositor
must query the shape rectangles. This may not be a desirable
feature for a Wayland compositor. Allow SHAPE to be turned off at
runtime, so that the compositor can opt-out.

Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
Simon Ser 2023-02-27 17:36:03 +01:00 committed by Olivier Fourdan
parent 6f0b9deed6
commit 21b3dad238
3 changed files with 3 additions and 1 deletions

View File

@ -108,6 +108,7 @@ extern _X_EXPORT Bool noScreenSaverExtension;
extern void ScreenSaverExtensionInit(void);
#endif
extern _X_EXPORT Bool noShapeExtension;
extern void ShapeExtensionInit(void);
#ifdef MITSHM

View File

@ -109,7 +109,7 @@ SOFTWARE.
/* List of built-in (statically linked) extensions */
static const ExtensionModule staticExtensions[] = {
{GEExtensionInit, "Generic Event Extension", &noGEExtension},
{ShapeExtensionInit, "SHAPE", NULL},
{ShapeExtensionInit, "SHAPE", &noShapeExtension},
#ifdef MITSHM
{ShmExtensionInit, "MIT-SHM", &noMITShmExtension},
#endif

View File

@ -143,6 +143,7 @@ Bool noMITShmExtension = FALSE;
Bool noRRExtension = FALSE;
#endif
Bool noRenderExtension = FALSE;
Bool noShapeExtension = FALSE;
#ifdef XCSECURITY
Bool noSecurityExtension = FALSE;