kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=f18f394e35c66b57b04fcf3b798b92fbea91da63

commit f18f394e35c66b57b04fcf3b798b92fbea91da63
Author: Kim Woelders <k...@woelders.dk>
Date:   Thu May 6 16:51:58 2021 +0200

    Introduce HAVE_COMPOSITE_OVERLAY_WINDOW
---
 configure.ac   |  2 ++
 src/alert.c    | 12 +++---------
 src/ecompmgr.c |  2 +-
 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
   PKG_CHECK_MODULES(XFIXES, xfixes,, enable_composite=no)
   if test "x$enable_composite" = "xyes"; then
     AC_DEFINE(USE_COMPOSITE, 1, [Composite support])
+    PKG_CHECK_EXISTS(xcomposite >= 0.3,
+      AC_DEFINE(HAVE_COMPOSITE_OVERLAY_WINDOW, 1, [Composite 0.3 support]))
   else
     AC_MSG_WARN([Composite support was requested but required component was 
not found])
   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 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various 
contributors
- * Copyright (C) 2004-2020 Kim Woelders
+ * Copyright (C) 2004-2021 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -36,12 +36,6 @@
 #include "util.h"
 #if USE_COMPOSITE
 #include <X11/extensions/Xcomposite.h>
-/* Composite Overlay Window (client) availability */
-#if VERS(COMPOSITE_MAJOR, COMPOSITE_MINOR) >= VERS(0, 3)
-#define USE_COMPOSITE_OVERLAY_WINDOW 1
-#else
-#define USE_COMPOSITE_OVERLAY_WINDOW 0
-#endif
 #endif
 
 #define ExTextExtents XmbTextExtents
@@ -263,7 +257,7 @@ ShowAlert(const char *title,
    mask = CWBackPixel | CWBorderPixel | CWOverrideRedirect | CWSaveUnder |
       CWBackingStore;
 
-#if USE_COMPOSITE_OVERLAY_WINDOW
+#if HAVE_COMPOSITE_OVERLAY_WINDOW
    /*
     * Intended workings:
     * Composite extension not enabled (or COW not available?)
@@ -533,7 +527,7 @@ ShowAlert(const char *title,
    XFreeFontSet(dd, xfs);
  done:
    XUngrabServer(dd);
-#if USE_COMPOSITE_OVERLAY_WINDOW
+#if HAVE_COMPOSITE_OVERLAY_WINDOW
    /* Force damage on root window where GSOD is/was rendered */
    if (root != DefaultRootWindow(dd))
      {
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 @@
 #define USE_CLIP_RELATIVE_TO_DESK 1
 
 /* Composite Overlay Window (client) availability */
-#if VERS(COMPOSITE_MAJOR, COMPOSITE_MINOR) >= VERS(0, 3)
+#if HAVE_COMPOSITE_OVERLAY_WINDOW
 #define USE_COMPOSITE_OVERLAY_WINDOW 1
 #else
 #define USE_COMPOSITE_OVERLAY_WINDOW 0

-- 


Reply via email to