diff options
author | Simon Ser <contact@emersion.fr> | 2023-02-27 17:36:03 +0100 |
---|---|---|
committer | Olivier Fourdan <fourdan@gmail.com> | 2023-03-03 18:28:40 +0000 |
commit | 21b3dad2380639573c251d95910bcb644049ee5f (patch) | |
tree | 3d2c058be561e18397c5309887ecefe53af0edbd | |
parent | 6f0b9deed66882aa18983eb35abca45207e37316 (diff) |
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>
-rw-r--r-- | include/extinit.h | 1 | ||||
-rw-r--r-- | mi/miinitext.c | 2 | ||||
-rw-r--r-- | os/utils.c | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/include/extinit.h b/include/extinit.h index 46081ad30..59d18962f 100644 --- a/include/extinit.h +++ b/include/extinit.h @@ -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 diff --git a/mi/miinitext.c b/mi/miinitext.c index 2e4aba534..26c1eb03c 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -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 diff --git a/os/utils.c b/os/utils.c index 405bf7d8b..a4712d0bf 100644 --- a/os/utils.c +++ b/os/utils.c @@ -143,6 +143,7 @@ Bool noMITShmExtension = FALSE; Bool noRRExtension = FALSE; #endif Bool noRenderExtension = FALSE; +Bool noShapeExtension = FALSE; #ifdef XCSECURITY Bool noSecurityExtension = FALSE; |