[PATCH 5/7] rootless: Genericize the config header a bit

Adam Jackson ajax at redhat.com
Thu Oct 17 10:30:11 PDT 2013


ROOTLESS_RESIZE_GRAVITY is an optimization, so let's default it to off
unless the backing window system is known to support it.

ROOTLESS_PROTECT_ALPHA looks like it has different values for xquartz
and win32, but hilariously rootlessGC.c merely checks if it is defined,
not what the value is.  It's effectively the more conservative path
anyway, so let's just turn it on.

Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 miext/rootless/rootlessConfig.h | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/miext/rootless/rootlessConfig.h b/miext/rootless/rootlessConfig.h
index d39ae63..4c464b9 100644
--- a/miext/rootless/rootlessConfig.h
+++ b/miext/rootless/rootlessConfig.h
@@ -35,28 +35,17 @@
 #define _ROOTLESSCONFIG_H
 
 #ifdef __APPLE__
+#define ROOTLESS_RESIZE_GRAVITY TRUE
+#endif
+
+/*# define ROOTLESSDEBUG*/
 
 #define ROOTLESS_PROTECT_ALPHA TRUE
 #define ROOTLESS_REDISPLAY_DELAY 10
-#define ROOTLESS_RESIZE_GRAVITY TRUE
-/*# define ROOTLESSDEBUG*/
 
 /* Bit mask for alpha channel with a particular number of bits per
    pixel. Note that we only care for 32bpp data. Mac OS X uses planar
    alpha for 16bpp. */
 #define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
 
-#endif                          /* __APPLE__ */
-
-#if defined(__CYGWIN__) || defined(WIN32)
-
-#define ROOTLESS_PROTECT_ALPHA NO
-#define ROOTLESS_REDISPLAY_DELAY 10
-#undef  ROOTLESS_RESIZE_GRAVITY
-/*# define ROOTLESSDEBUG*/
-
-#define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
-
-#endif                          /* __CYGWIN__ */
-
 #endif                          /* _ROOTLESSCONFIG_H */
-- 
1.8.3.1



More information about the xorg-devel mailing list