summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Woelders <kim@woelders.dk>2021-05-06 16:51:58 +0200
committerKim Woelders <kim@woelders.dk>2021-05-07 07:11:09 +0200
commitf18f394e35c66b57b04fcf3b798b92fbea91da63 (patch)
tree2b8b90ce35908e49a041f5c5b8cbe524fdd9705e
parent6b1668d60b214d2f4d42f66da7238053bc914f3b (diff)
Introduce HAVE_COMPOSITE_OVERLAY_WINDOW
-rw-r--r--configure.ac2
-rw-r--r--src/alert.c12
-rw-r--r--src/ecompmgr.c2
3 files changed, 6 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index a06ffbc8..bd095d91 100644
--- a/configure.ac
+++ b/configure.ac
@@ -364,6 +364,8 @@ if test "x$enable_composite" = "xyes"; then
364 PKG_CHECK_MODULES(XFIXES, xfixes,, enable_composite=no) 364 PKG_CHECK_MODULES(XFIXES, xfixes,, enable_composite=no)
365 if test "x$enable_composite" = "xyes"; then 365 if test "x$enable_composite" = "xyes"; then
366 AC_DEFINE(USE_COMPOSITE, 1, [Composite support]) 366 AC_DEFINE(USE_COMPOSITE, 1, [Composite support])
367 PKG_CHECK_EXISTS(xcomposite >= 0.3,
368 AC_DEFINE(HAVE_COMPOSITE_OVERLAY_WINDOW, 1, [Composite 0.3 support]))
367 else 369 else
368 AC_MSG_WARN([Composite support was requested but required component was not found]) 370 AC_MSG_WARN([Composite support was requested but required component was not found])
369 fi 371 fi
diff --git a/src/alert.c b/src/alert.c
index 0b9c8640..037f2c44 100644
--- a/src/alert.c
+++ b/src/alert.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors 2 * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
3 * Copyright (C) 2004-2020 Kim Woelders 3 * Copyright (C) 2004-2021 Kim Woelders
4 * 4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy 5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to 6 * of this software and associated documentation files (the "Software"), to
@@ -36,12 +36,6 @@
36#include "util.h" 36#include "util.h"
37#if USE_COMPOSITE 37#if USE_COMPOSITE
38#include <X11/extensions/Xcomposite.h> 38#include <X11/extensions/Xcomposite.h>
39/* Composite Overlay Window (client) availability */
40#if VERS(COMPOSITE_MAJOR, COMPOSITE_MINOR) >= VERS(0, 3)
41#define USE_COMPOSITE_OVERLAY_WINDOW 1
42#else
43#define USE_COMPOSITE_OVERLAY_WINDOW 0
44#endif
45#endif 39#endif
46 40
47#define ExTextExtents XmbTextExtents 41#define ExTextExtents XmbTextExtents
@@ -263,7 +257,7 @@ ShowAlert(const char *title,
263 mask = CWBackPixel | CWBorderPixel | CWOverrideRedirect | CWSaveUnder | 257 mask = CWBackPixel | CWBorderPixel | CWOverrideRedirect | CWSaveUnder |
264 CWBackingStore; 258 CWBackingStore;
265 259
266#if USE_COMPOSITE_OVERLAY_WINDOW 260#if HAVE_COMPOSITE_OVERLAY_WINDOW
267 /* 261 /*
268 * Intended workings: 262 * Intended workings:
269 * Composite extension not enabled (or COW not available?) 263 * Composite extension not enabled (or COW not available?)
@@ -533,7 +527,7 @@ ShowAlert(const char *title,
533 XFreeFontSet(dd, xfs); 527 XFreeFontSet(dd, xfs);
534 done: 528 done:
535 XUngrabServer(dd); 529 XUngrabServer(dd);
536#if USE_COMPOSITE_OVERLAY_WINDOW 530#if HAVE_COMPOSITE_OVERLAY_WINDOW
537 /* Force damage on root window where GSOD is/was rendered */ 531 /* Force damage on root window where GSOD is/was rendered */
538 if (root != DefaultRootWindow(dd)) 532 if (root != DefaultRootWindow(dd))
539 { 533 {
diff --git a/src/ecompmgr.c b/src/ecompmgr.c
index 1c32f895..2c75bd60 100644
--- a/src/ecompmgr.c
+++ b/src/ecompmgr.c
@@ -66,7 +66,7 @@
66#define USE_CLIP_RELATIVE_TO_DESK 1 66#define USE_CLIP_RELATIVE_TO_DESK 1
67 67
68/* Composite Overlay Window (client) availability */ 68/* Composite Overlay Window (client) availability */
69#if VERS(COMPOSITE_MAJOR, COMPOSITE_MINOR) >= VERS(0, 3) 69#if HAVE_COMPOSITE_OVERLAY_WINDOW
70#define USE_COMPOSITE_OVERLAY_WINDOW 1 70#define USE_COMPOSITE_OVERLAY_WINDOW 1
71#else 71#else
72#define USE_COMPOSITE_OVERLAY_WINDOW 0 72#define USE_COMPOSITE_OVERLAY_WINDOW 0