$(XRANDR_CFLAGS) \
$(XSHAPE_CFLAGS) \
$(XSYNC_CFLAGS) \
+ $(XRENDER_CFLAGS) \
+ $(XDAMAGE_CFLAGS) \
+ $(XCOMPOSITE_CFLAGS) \
$(GLIB_CFLAGS) \
$(XML_CFLAGS) \
-DG_LOG_DOMAIN=\"Obt\" \
$(XRANDR_LIBS) \
$(XSHAPE_LIBS) \
$(XSYNC_LIBS) \
+ $(XRENDER_LIBS) \
+ $(XDAMAGE_LIBS) \
+ $(XCOMPOSITE_LIBS) \
$(GLIB_LIBS) \
$(XML_LIBS)
obt_libobt_la_SOURCES = \
AM_CONDITIONAL(USE_IMLIB2, [test $imlib2_found = yes])
+AC_ARG_ENABLE(compositing,
+ AC_HELP_STRING(
+ [--disable-compositing],
+ [disable the built-in compositing manager [[default=enabled]]]
+ ),
+ [enable_compositing=$enableval],
+ [enable_compositing=yes]
+)
+
+AC_MSG_CHECKING(if compositing manager support should be enabled)
+AC_MSG_RESULT($enable_compositing)
+
+if test "$enable_compositing" = yes; then
+ PKG_CHECK_MODULES(XCOMPOSITE, [xcomposite])
+ AC_SUBST(XCOMPOSITE_CFLAGS)
+ AC_SUBST(XCOMPOSITE_LIBS)
+
+ PKG_CHECK_MODULES([XRENDER], [xrender])
+ AC_SUBST(XRENDER_CFLAGS)
+ AC_SUBST(XRENDER_LIBS)
+
+ PKG_CHECK_MODULES(XDAMAGE, [xdamage])
+ AC_SUBST(XDAMAGE_CFLAGS)
+ AC_SUBST(XDAMAGE_LIBS)
+
+ PKG_CHECK_MODULES(XFIXES, [xfixes])
+ AC_SUBST(XDAMAGE_CFLAGS)
+ AC_SUBST(XDAMAGE_LIBS)
+
+ AC_MSG_CHECKING(for GL_CFLAGS)
+ AC_ARG_WITH(gl-cflags, [ --with-gl-cflags=CFLAGS ],
+ [GL_CFLAGS="$withval"],
+ [GL_CFLAGS=""])
+
+ AC_MSG_RESULT($GL_CFLAGS)
+ AC_MSG_CHECKING(for GL_LIBS)
+ AC_ARG_WITH(gl-libs, [ --with-gl-libs=LIBS ],
+ [GL_LIBS="$withval"],
+ [GL_LIBS="-lGL"])
+ AC_MSG_RESULT($GL_LIBS)
+
+ AC_CHECK_LIB([GL], [glPopMatrix], ,
+ AC_MSG_ERROR([Could not find glPopMatrix in -lGL.]))
+
+ AC_MSG_CHECKING([for GL/gl.h])
+ AC_TRY_COMPILE(
+ [#include <GL/gl.h>],
+ [GLenum e = GL_INVALID_ENUM;],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Could not compile with GL/gl.h])])
+
+ AC_MSG_CHECKING([for GL/glx.h])
+ AC_TRY_COMPILE(
+ [#include <GL/glx.h>],
+ [int i = GLX_USE_GL;],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Could not compile with GL/glx.h])])
+
+ AC_SUBST(GL_CFLAGS)
+ AC_SUBST(GL_LIBS)
+
+ AC_DEFINE(USE_COMPOSITING, [1], [Support being a compositing manager])
+ do_compositing="yes"
+else
+ do_compositing="no"
+fi
+
dnl Check for session management
X11_SM
X Cursor Library... $xcursor_found
Session Management... $SM
Imlib2 library... $imlib2_found
+ Compositing manager... $do_compositing
])
AC_MSG_RESULT([configure complete, now type "make"])
/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
obt/display.c for the Openbox window manager
- Copyright (c) 2007 Dana Jansens
+ Copyright (c) 2007-2008 Dana Jansens
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
gint obt_display_extension_randr_basep;
gboolean obt_display_extension_sync = FALSE;
gint obt_display_extension_sync_basep;
+gboolean obt_display_extension_composite = FALSE;
+gint obt_display_extension_composite_basep;
+gboolean obt_display_extension_damage = FALSE;
+gint obt_display_extension_damage_basep;
+gboolean obt_display_extension_render = FALSE;
+gint obt_display_extension_render_basep;
+gboolean obt_display_extension_fixes = FALSE;
+gint obt_display_extension_fixes_basep;
static gint xerror_handler(Display *d, XErrorEvent *e);
XSyncQueryExtension(d, &obt_display_extension_sync_basep,
&junk) && XSyncInitialize(d, &junk, &junk);
if (!obt_display_extension_sync)
- g_message("X Sync extension is not present on the server or is an "
- "incompatible version");
+ g_message("X Sync extension is not present on the server");
+#endif
+
+#ifdef USE_COMPOSITING
+ if (XCompositeQueryExtension(d, &obt_display_extension_composite_basep,
+ &junk))
+ {
+ gint major = 0, minor = 2;
+ XCompositeQueryVersion(d, &major, &minor);
+ /* Version 0.2 is the first version to have the
+ XCompositeNameWindowPixmap() request. */
+ if (major > 0 || minor >= 2)
+ obt_display_extension_composite = TRUE;
+ }
+ if (!obt_display_extension_composite)
+ g_message("X Composite extension is not present on the server or "
+ "is an incompatible version");
+
+ obt_display_extension_damage =
+ XDamageQueryExtension(d, &obt_display_extension_damage_basep,
+ &junk);
+ if (!obt_display_extension_damage)
+ g_message("X Damage extension is not present on the server");
+
+ obt_display_extension_render =
+ XRenderQueryExtension(d, &obt_display_extension_render_basep,
+ &junk);
+ if (!obt_display_extension_render)
+ g_message("X Render extension is not present on the server");
+
+ obt_display_extension_fixes =
+ XFixesQueryExtension(d, &obt_display_extension_fixes_basep,
+ &junk);
+ if (!obt_display_extension_fixes)
+ g_message("X Fixes extension is not present on the server");
#endif
obt_prop_startup();
/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
obt/display.h for the Openbox window manager
- Copyright (c) 2007 Dana Jansens
+ Copyright (c) 2007-2008 Dana Jansens
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifdef SYNC
#include <X11/extensions/sync.h>
#endif
+#ifdef USE_COMPOSITING
+#include <X11/extensions/Xcomposite.h>
+#include <X11/extensions/Xdamage.h>
+#include <X11/extensions/Xrender.h>
+#include <X11/extensions/Xfixes.h>
+#endif
G_BEGIN_DECLS
extern gint obt_display_extension_randr_basep;
extern gboolean obt_display_extension_sync;
extern gint obt_display_extension_sync_basep;
+extern gboolean obt_display_extension_composite;
+extern gint obt_display_extension_composite_basep;
+extern gboolean obt_display_extension_damage;
+extern gint obt_display_extension_damage_basep;
+extern gboolean obt_display_extension_render;
+extern gint obt_display_extension_render_basep;
+extern gboolean obt_display_extension_fixes;
+extern gint obt_display_extension_fixes_basep;
extern Display* obt_display;