Update to xcompmgr 1.1.5
This commit is contained in:
parent
a754bcb2f1
commit
58d19af4a2
@ -1,3 +1,102 @@
|
||||
commit 2af85f6d21d175c2a16411540d4e44851c803fbe
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Mon Nov 2 15:21:09 2009 -0800
|
||||
|
||||
xcompmgr 1.1.5
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 664ef69cda82f23a4bdbaff0d7522d81503d3393
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Mon Nov 2 14:19:33 2009 -0800
|
||||
|
||||
Add COPYING file with copyright/license notice from xcompmgr.c
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 62c0df919bfaf2a379767ad7dc7a0113a8151255
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Mon Nov 2 12:55:11 2009 -0800
|
||||
|
||||
Fix formatting of options/arguments in man page
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit d8068fe9e666bb384a9eeac8983cb1ac8c2824a1
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Mon Oct 19 15:48:59 2009 -0700
|
||||
|
||||
Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit 1d7eab63f9aee89767d8083dc971623863173c78
|
||||
Author: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
Date: Thu Oct 1 14:54:21 2009 -0700
|
||||
|
||||
Add README with pointers to mailing lists, bugzilla, & git
|
||||
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
||||
|
||||
commit f15e054cfb103f78a04ace9eefaecddac8bc70e6
|
||||
Author: Yann Droneaud <ydroneaud@mandriva.com>
|
||||
Date: Tue Mar 24 12:59:01 2009 +0100
|
||||
|
||||
Try to report current composite manager name
|
||||
|
||||
Try to read NET_WM_CM_Sn owner's NET_WM_NAME (or WM_NAME) property,
|
||||
otherwise report it's window id.
|
||||
Remarks: metacity and kwin currently don't set a window name for
|
||||
NET_WM_CM_Sn owner, but xcompmgr and compiz do. This should be added
|
||||
to wm-spec.
|
||||
|
||||
commit 3b6155eb533936f756d9e3e4c5802c188b7db35a
|
||||
Author: Yann Droneaud <ydroneaud@mandriva.com>
|
||||
Date: Tue Mar 24 12:02:03 2009 +0100
|
||||
|
||||
Check for _NET_WM_CM_Sn before trying to install ourself as composite manager
|
||||
|
||||
Check for a selection owner of _NET_WM_CM_Sn is the first thing to do
|
||||
before taking ownership on it, so clients watching for selection ownership
|
||||
changes won't be disturbed.
|
||||
|
||||
commit 56b0b324ae0dbe5dda2bb89ef43427a6c19777bc
|
||||
Author: Yann Droneaud <ydroneaud@mandriva.com>
|
||||
Date: Tue Mar 24 11:50:20 2009 +0100
|
||||
|
||||
Don't hard code the screen number
|
||||
|
||||
commit a78f73b0d01374089ca7fcd838b647f6cfd1663a
|
||||
Author: Yann Droneaud <ydroneaud@mandriva.com>
|
||||
Date: Thu Mar 26 12:05:30 2009 +0100
|
||||
|
||||
Fix error reporting
|
||||
|
||||
Use the 'name' looked up for extension errors
|
||||
If 'name' is NULL, use XGetErrorText().
|
||||
Report error on stderr.
|
||||
|
||||
commit 58d299e54e1198bfa64c39e49c2c0020f9f62b98
|
||||
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
|
||||
Date: Mon Jan 19 19:49:37 2009 -0200
|
||||
|
||||
Ansification and compile warning fixes.
|
||||
|
||||
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
|
||||
make distcheck and all gcc 4.3 and sparse warnings.
|
||||
|
||||
commit b04819d129a9a74ab2f17c4a6f9cceabf3aa18d2
|
||||
Author: James Cloos <cloos@jhcloos.com>
|
||||
Date: Wed Apr 2 12:52:40 2008 -0400
|
||||
|
||||
Make usage() report the current version.
|
||||
|
||||
commit e895139f38a3fa717ef652ee896f2ea6cc52811f
|
||||
Author: Adam Jackson <ajax@redhat.com>
|
||||
Date: Thu Mar 6 17:01:31 2008 -0500
|
||||
|
||||
xcompmgr 1.1.4
|
||||
|
||||
commit 73f6ed3310d15300ba38f6a338d640705a83ef36
|
||||
Author: Dana Jansens <danakj@orodu.net>
|
||||
Date: Wed Feb 13 11:24:32 2008 -0800
|
||||
|
@ -1,9 +1,8 @@
|
||||
bin_PROGRAMS = xcompmgr
|
||||
man_MANS = xcompmgr.1
|
||||
|
||||
xcompmgr_LDADD = @XCOMPMGR_LIBS@ -lm
|
||||
|
||||
INCLUDES = @XCOMPMGR_CFLAGS@
|
||||
AM_CFLAGS = $(CWARNFLAGS) $(XCOMPMGR_CFLAGS)
|
||||
xcompmgr_LDADD = $(XCOMPMGR_LIBS) -lm
|
||||
|
||||
EXTRA_DIST = \
|
||||
autogen.sh \
|
||||
@ -15,7 +14,7 @@ MAINTAINERCLEANFILES=ChangeLog
|
||||
.PHONY: ChangeLog
|
||||
|
||||
ChangeLog:
|
||||
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
|
||||
$(CHANGELOG_CMD)
|
||||
|
||||
dist-hook: ChangeLog
|
||||
|
||||
|
@ -34,12 +34,14 @@ POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = xcompmgr$(EXEEXT)
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(top_srcdir)/configure AUTHORS ChangeLog NEWS depcomp \
|
||||
install-sh missing
|
||||
$(top_srcdir)/configure AUTHORS COPYING ChangeLog NEWS \
|
||||
config.guess config.sub depcomp install-sh missing
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
@ -54,7 +56,8 @@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
xcompmgr_SOURCES = xcompmgr.c
|
||||
xcompmgr_OBJECTS = xcompmgr.$(OBJEXT)
|
||||
xcompmgr_DEPENDENCIES =
|
||||
am__DEPENDENCIES_1 =
|
||||
xcompmgr_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@ -79,11 +82,14 @@ am__remove_distdir = \
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
|
||||
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
APP_MAN_DIR = @APP_MAN_DIR@
|
||||
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
@ -91,16 +97,23 @@ AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CHANGELOG_CMD = @CHANGELOG_CMD@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CWARNFLAGS = @CWARNFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
|
||||
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FILE_MAN_DIR = @FILE_MAN_DIR@
|
||||
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
@ -108,11 +121,15 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIB_MAN_DIR = @LIB_MAN_DIR@
|
||||
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MISC_MAN_DIR = @MISC_MAN_DIR@
|
||||
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
@ -129,8 +146,6 @@ VERSION = @VERSION@
|
||||
XCOMPMGR_CFLAGS = @XCOMPMGR_CFLAGS@
|
||||
XCOMPMGR_LIBS = @XCOMPMGR_LIBS@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
@ -139,28 +154,44 @@ am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
distcleancheck_listfiles = @distcleancheck_listfiles@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
man_MANS = xcompmgr.1
|
||||
xcompmgr_LDADD = @XCOMPMGR_LIBS@ -lm
|
||||
INCLUDES = @XCOMPMGR_CFLAGS@
|
||||
AM_CFLAGS = $(CWARNFLAGS) $(XCOMPMGR_CFLAGS)
|
||||
xcompmgr_LDADD = $(XCOMPMGR_LIBS) -lm
|
||||
EXTRA_DIST = \
|
||||
autogen.sh \
|
||||
ChangeLog \
|
||||
@ -598,7 +629,7 @@ uninstall-man: uninstall-man1
|
||||
.PHONY: ChangeLog
|
||||
|
||||
ChangeLog:
|
||||
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
|
||||
$(CHANGELOG_CMD)
|
||||
|
||||
dist-hook: ChangeLog
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
|
@ -0,0 +1,27 @@
|
||||
xcompmgr is a sample compositing manager for X servers supporting the
|
||||
XFIXES, DAMAGE, RENDER, and COMPOSITE extensions. It enables basic
|
||||
eye-candy effects.
|
||||
|
||||
All questions regarding this software should be directed at the
|
||||
Xorg mailing list:
|
||||
|
||||
http://lists.freedesktop.org/mailman/listinfo/xorg
|
||||
|
||||
Please submit bug reports to the Xorg bugzilla:
|
||||
|
||||
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
|
||||
|
||||
The master development code repository can be found at:
|
||||
|
||||
git://anongit.freedesktop.org/git/xorg/app/xcompmgr
|
||||
|
||||
http://cgit.freedesktop.org/xorg/app/xcompmgr
|
||||
|
||||
For patch submission instructions, see:
|
||||
|
||||
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
|
||||
|
||||
For more information on the git code manager, see:
|
||||
|
||||
http://wiki.x.org/wiki/GitPage
|
||||
|
580
app/xcompmgr/aclocal.m4
vendored
580
app/xcompmgr/aclocal.m4
vendored
@ -983,3 +983,583 @@ AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
|
||||
dnl
|
||||
dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl
|
||||
dnl Permission is hereby granted, free of charge, to any person obtaining a
|
||||
dnl copy of this software and associated documentation files (the
|
||||
dnl "Software"), to deal in the Software without restriction, including
|
||||
dnl without limitation the rights to use, copy, modify, merge, publish,
|
||||
dnl distribute, and/or sell copies of the Software, and to permit persons
|
||||
dnl to whom the Software is furnished to do so, provided that the above
|
||||
dnl copyright notice(s) and this permission notice appear in all copies of
|
||||
dnl the Software and that both the above copyright notice(s) and this
|
||||
dnl permission notice appear in supporting documentation.
|
||||
dnl
|
||||
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
|
||||
dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
dnl
|
||||
dnl Except as contained in this notice, the name of a copyright holder
|
||||
dnl shall not be used in advertising or otherwise to promote the sale, use
|
||||
dnl or other dealings in this Software without prior written authorization
|
||||
dnl of the copyright holder.
|
||||
|
||||
# XORG_MACROS_VERSION(required-version)
|
||||
# -------------------------------------
|
||||
# Minimum version: 1.1.0
|
||||
#
|
||||
# If you're using a macro added in Version 1.1 or newer, include this in
|
||||
# your configure.ac with the minimum required version, such as:
|
||||
# XORG_MACROS_VERSION(1.1)
|
||||
#
|
||||
# To ensure that this macro is defined, also add:
|
||||
# m4_ifndef([XORG_MACROS_VERSION],
|
||||
# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
|
||||
#
|
||||
#
|
||||
# See the "minimum version" comment for each macro you use to see what
|
||||
# version you require.
|
||||
m4_defun([XORG_MACROS_VERSION],[
|
||||
m4_define([vers_have], [1.3.0])
|
||||
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
|
||||
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
|
||||
m4_if(m4_cmp(maj_have, maj_needed), 0,,
|
||||
[m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
|
||||
m4_if(m4_version_compare(vers_have, [$1]), -1,
|
||||
[m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
|
||||
m4_undefine([vers_have])
|
||||
m4_undefine([maj_have])
|
||||
m4_undefine([maj_needed])
|
||||
]) # XORG_MACROS_VERSION
|
||||
|
||||
# XORG_PROG_RAWCPP()
|
||||
# ------------------
|
||||
# Minimum version: 1.0.0
|
||||
#
|
||||
# Find cpp program and necessary flags for use in pre-processing text files
|
||||
# such as man pages and config files
|
||||
AC_DEFUN([XORG_PROG_RAWCPP],[
|
||||
AC_REQUIRE([AC_PROG_CPP])
|
||||
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
|
||||
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
|
||||
|
||||
# Check for flag to avoid builtin definitions - assumes unix is predefined,
|
||||
# which is not the best choice for supporting other OS'es, but covers most
|
||||
# of the ones we need for now.
|
||||
AC_MSG_CHECKING([if $RAWCPP requires -undef])
|
||||
AC_LANG_CONFTEST([Does cpp redefine unix ?])
|
||||
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
RAWCPPFLAGS=-undef
|
||||
AC_MSG_RESULT([yes])
|
||||
# under Cygwin unix is still defined even with -undef
|
||||
elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
|
||||
RAWCPPFLAGS="-undef -ansi"
|
||||
AC_MSG_RESULT([yes, with -ansi])
|
||||
else
|
||||
AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
|
||||
fi
|
||||
fi
|
||||
rm -f conftest.$ac_ext
|
||||
|
||||
AC_MSG_CHECKING([if $RAWCPP requires -traditional])
|
||||
AC_LANG_CONFTEST([Does cpp preserve "whitespace"?])
|
||||
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
|
||||
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.])
|
||||
fi
|
||||
fi
|
||||
rm -f conftest.$ac_ext
|
||||
AC_SUBST(RAWCPPFLAGS)
|
||||
]) # XORG_PROG_RAWCPP
|
||||
|
||||
# XORG_MANPAGE_SECTIONS()
|
||||
# -----------------------
|
||||
# Minimum version: 1.0.0
|
||||
#
|
||||
# Determine which sections man pages go in for the different man page types
|
||||
# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
|
||||
# Not sure if there's any better way than just hardcoding by OS name.
|
||||
# Override default settings by setting environment variables
|
||||
|
||||
AC_DEFUN([XORG_MANPAGE_SECTIONS],[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
|
||||
if test x$APP_MAN_SUFFIX = x ; then
|
||||
APP_MAN_SUFFIX=1
|
||||
fi
|
||||
if test x$APP_MAN_DIR = x ; then
|
||||
APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
|
||||
fi
|
||||
|
||||
if test x$LIB_MAN_SUFFIX = x ; then
|
||||
LIB_MAN_SUFFIX=3
|
||||
fi
|
||||
if test x$LIB_MAN_DIR = x ; then
|
||||
LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
|
||||
fi
|
||||
|
||||
if test x$FILE_MAN_SUFFIX = x ; then
|
||||
case $host_os in
|
||||
solaris*) FILE_MAN_SUFFIX=4 ;;
|
||||
*) FILE_MAN_SUFFIX=5 ;;
|
||||
esac
|
||||
fi
|
||||
if test x$FILE_MAN_DIR = x ; then
|
||||
FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
|
||||
fi
|
||||
|
||||
if test x$MISC_MAN_SUFFIX = x ; then
|
||||
case $host_os in
|
||||
solaris*) MISC_MAN_SUFFIX=5 ;;
|
||||
*) MISC_MAN_SUFFIX=7 ;;
|
||||
esac
|
||||
fi
|
||||
if test x$MISC_MAN_DIR = x ; then
|
||||
MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
|
||||
fi
|
||||
|
||||
if test x$DRIVER_MAN_SUFFIX = x ; then
|
||||
case $host_os in
|
||||
solaris*) DRIVER_MAN_SUFFIX=7 ;;
|
||||
*) DRIVER_MAN_SUFFIX=4 ;;
|
||||
esac
|
||||
fi
|
||||
if test x$DRIVER_MAN_DIR = x ; then
|
||||
DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
|
||||
fi
|
||||
|
||||
if test x$ADMIN_MAN_SUFFIX = x ; then
|
||||
case $host_os in
|
||||
solaris*) ADMIN_MAN_SUFFIX=1m ;;
|
||||
*) ADMIN_MAN_SUFFIX=8 ;;
|
||||
esac
|
||||
fi
|
||||
if test x$ADMIN_MAN_DIR = x ; then
|
||||
ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
|
||||
fi
|
||||
|
||||
|
||||
AC_SUBST([APP_MAN_SUFFIX])
|
||||
AC_SUBST([LIB_MAN_SUFFIX])
|
||||
AC_SUBST([FILE_MAN_SUFFIX])
|
||||
AC_SUBST([MISC_MAN_SUFFIX])
|
||||
AC_SUBST([DRIVER_MAN_SUFFIX])
|
||||
AC_SUBST([ADMIN_MAN_SUFFIX])
|
||||
AC_SUBST([APP_MAN_DIR])
|
||||
AC_SUBST([LIB_MAN_DIR])
|
||||
AC_SUBST([FILE_MAN_DIR])
|
||||
AC_SUBST([MISC_MAN_DIR])
|
||||
AC_SUBST([DRIVER_MAN_DIR])
|
||||
AC_SUBST([ADMIN_MAN_DIR])
|
||||
]) # XORG_MANPAGE_SECTIONS
|
||||
|
||||
# XORG_CHECK_LINUXDOC
|
||||
# -------------------
|
||||
# Minimum version: 1.0.0
|
||||
#
|
||||
# Defines the variable MAKE_TEXT if the necessary tools and
|
||||
# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
|
||||
# Whether or not the necessary tools and files are found can be checked
|
||||
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
|
||||
AC_DEFUN([XORG_CHECK_LINUXDOC],[
|
||||
if test x$XORG_SGML_PATH = x ; then
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
fi
|
||||
HAVE_DEFS_ENT=
|
||||
|
||||
if test x"$cross_compiling" = x"yes" ; then
|
||||
HAVE_DEFS_ENT=no
|
||||
else
|
||||
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(LINUXDOC, linuxdoc)
|
||||
AC_PATH_PROG(PS2PDF, ps2pdf)
|
||||
|
||||
AC_MSG_CHECKING([Whether to build documentation])
|
||||
|
||||
if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
|
||||
BUILDDOC=yes
|
||||
else
|
||||
BUILDDOC=no
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
|
||||
|
||||
AC_MSG_RESULT([$BUILDDOC])
|
||||
|
||||
AC_MSG_CHECKING([Whether to build pdf documentation])
|
||||
|
||||
if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
|
||||
BUILDPDFDOC=yes
|
||||
else
|
||||
BUILDPDFDOC=no
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
|
||||
|
||||
AC_MSG_RESULT([$BUILDPDFDOC])
|
||||
|
||||
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
|
||||
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
|
||||
MAKE_PDF="$PS2PDF"
|
||||
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0"
|
||||
|
||||
AC_SUBST(MAKE_TEXT)
|
||||
AC_SUBST(MAKE_PS)
|
||||
AC_SUBST(MAKE_PDF)
|
||||
AC_SUBST(MAKE_HTML)
|
||||
]) # XORG_CHECK_LINUXDOC
|
||||
|
||||
# XORG_CHECK_DOCBOOK
|
||||
# -------------------
|
||||
# Minimum version: 1.0.0
|
||||
#
|
||||
# Checks for the ability to build output formats from SGML DocBook source.
|
||||
# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
|
||||
# indicates whether the necessary tools and files are found and, if set,
|
||||
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
|
||||
AC_DEFUN([XORG_CHECK_DOCBOOK],[
|
||||
if test x$XORG_SGML_PATH = x ; then
|
||||
XORG_SGML_PATH=$prefix/share/sgml
|
||||
fi
|
||||
HAVE_DEFS_ENT=
|
||||
BUILDTXTDOC=no
|
||||
BUILDPDFDOC=no
|
||||
BUILDPSDOC=no
|
||||
BUILDHTMLDOC=no
|
||||
|
||||
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
|
||||
|
||||
AC_PATH_PROG(DOCBOOKPS, docbook2ps)
|
||||
AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
|
||||
AC_PATH_PROG(DOCBOOKHTML, docbook2html)
|
||||
AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
|
||||
|
||||
AC_MSG_CHECKING([Whether to build text documentation])
|
||||
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
|
||||
test x$BUILD_TXTDOC != xno; then
|
||||
BUILDTXTDOC=yes
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
|
||||
AC_MSG_RESULT([$BUILDTXTDOC])
|
||||
|
||||
AC_MSG_CHECKING([Whether to build PDF documentation])
|
||||
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
|
||||
test x$BUILD_PDFDOC != xno; then
|
||||
BUILDPDFDOC=yes
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
|
||||
AC_MSG_RESULT([$BUILDPDFDOC])
|
||||
|
||||
AC_MSG_CHECKING([Whether to build PostScript documentation])
|
||||
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
|
||||
test x$BUILD_PSDOC != xno; then
|
||||
BUILDPSDOC=yes
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
|
||||
AC_MSG_RESULT([$BUILDPSDOC])
|
||||
|
||||
AC_MSG_CHECKING([Whether to build HTML documentation])
|
||||
if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
|
||||
test x$BUILD_HTMLDOC != xno; then
|
||||
BUILDHTMLDOC=yes
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
|
||||
AC_MSG_RESULT([$BUILDHTMLDOC])
|
||||
|
||||
MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
|
||||
MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
|
||||
MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
|
||||
MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
|
||||
|
||||
AC_SUBST(MAKE_TEXT)
|
||||
AC_SUBST(MAKE_PS)
|
||||
AC_SUBST(MAKE_PDF)
|
||||
AC_SUBST(MAKE_HTML)
|
||||
]) # XORG_CHECK_DOCBOOK
|
||||
|
||||
# XORG_CHECK_MALLOC_ZERO
|
||||
# ----------------------
|
||||
# Minimum version: 1.0.0
|
||||
#
|
||||
# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
|
||||
# malloc(0) returns NULL. Packages should add one of these cflags to
|
||||
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
|
||||
AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
|
||||
AC_ARG_ENABLE(malloc0returnsnull,
|
||||
AS_HELP_STRING([--enable-malloc0returnsnull],
|
||||
[malloc(0) returns NULL (default: auto)]),
|
||||
[MALLOC_ZERO_RETURNS_NULL=$enableval],
|
||||
[MALLOC_ZERO_RETURNS_NULL=auto])
|
||||
|
||||
AC_MSG_CHECKING([whether malloc(0) returns NULL])
|
||||
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
|
||||
AC_RUN_IFELSE([
|
||||
char *malloc();
|
||||
char *realloc();
|
||||
char *calloc();
|
||||
main() {
|
||||
char *m0, *r0, *c0, *p;
|
||||
m0 = malloc(0);
|
||||
p = malloc(10);
|
||||
r0 = realloc(p,0);
|
||||
c0 = calloc(0);
|
||||
exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
|
||||
}],
|
||||
[MALLOC_ZERO_RETURNS_NULL=yes],
|
||||
[MALLOC_ZERO_RETURNS_NULL=no])
|
||||
fi
|
||||
AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
|
||||
|
||||
if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
|
||||
MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
|
||||
XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
|
||||
XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
|
||||
else
|
||||
MALLOC_ZERO_CFLAGS=""
|
||||
XMALLOC_ZERO_CFLAGS=""
|
||||
XTMALLOC_ZERO_CFLAGS=""
|
||||
fi
|
||||
|
||||
AC_SUBST([MALLOC_ZERO_CFLAGS])
|
||||
AC_SUBST([XMALLOC_ZERO_CFLAGS])
|
||||
AC_SUBST([XTMALLOC_ZERO_CFLAGS])
|
||||
]) # XORG_CHECK_MALLOC_ZERO
|
||||
|
||||
# XORG_WITH_LINT()
|
||||
# ----------------
|
||||
# Minimum version: 1.1.0
|
||||
#
|
||||
# Sets up flags for source checkers such as lint and sparse if --with-lint
|
||||
# is specified. (Use --with-lint=sparse for sparse.)
|
||||
# Sets $LINT to name of source checker passed with --with-lint (default: lint)
|
||||
# Sets $LINT_FLAGS to flags to pass to source checker
|
||||
# Sets LINT automake conditional if enabled (default: disabled)
|
||||
#
|
||||
AC_DEFUN([XORG_WITH_LINT],[
|
||||
|
||||
# Allow checking code with lint, sparse, etc.
|
||||
AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
|
||||
[Use a lint-style source code checker (default: disabled)])],
|
||||
[use_lint=$withval], [use_lint=no])
|
||||
if test "x$use_lint" = "xyes" ; then
|
||||
LINT="lint"
|
||||
else
|
||||
LINT="$use_lint"
|
||||
fi
|
||||
if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
|
||||
case $LINT in
|
||||
lint|*/lint)
|
||||
case $host_os in
|
||||
solaris*)
|
||||
LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_SUBST(LINT)
|
||||
AC_SUBST(LINT_FLAGS)
|
||||
AM_CONDITIONAL(LINT, [test x$LINT != xno])
|
||||
|
||||
]) # XORG_WITH_LINT
|
||||
|
||||
# XORG_LINT_LIBRARY(LIBNAME)
|
||||
# --------------------------
|
||||
# Minimum version: 1.1.0
|
||||
#
|
||||
# Sets up flags for building lint libraries for checking programs that call
|
||||
# functions in the library.
|
||||
# Disabled by default, enable with --enable-lint-library
|
||||
# Sets:
|
||||
# @LINTLIB@ - name of lint library file to make
|
||||
# MAKE_LINT_LIB - automake conditional
|
||||
#
|
||||
|
||||
AC_DEFUN([XORG_LINT_LIBRARY],[
|
||||
AC_REQUIRE([XORG_WITH_LINT])
|
||||
# Build lint "library" for more indepth checks of programs calling this library
|
||||
AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
|
||||
[Create lint library (default: disabled)])],
|
||||
[make_lint_lib=$enableval], [make_lint_lib=no])
|
||||
if test "x$make_lint_lib" != "xno" ; then
|
||||
if test "x$LINT" = "xno" ; then
|
||||
AC_MSG_ERROR([Cannot make lint library without --with-lint])
|
||||
fi
|
||||
if test "x$make_lint_lib" = "xyes" ; then
|
||||
LINTLIB=llib-l$1.ln
|
||||
else
|
||||
LINTLIB=$make_lint_lib
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(LINTLIB)
|
||||
AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
|
||||
|
||||
]) # XORG_LINT_LIBRARY
|
||||
|
||||
# XORG_CWARNFLAGS
|
||||
# ---------------
|
||||
# Minimum version: 1.2.0
|
||||
#
|
||||
# Defines CWARNFLAGS to enable C compiler warnings.
|
||||
#
|
||||
AC_DEFUN([XORG_CWARNFLAGS], [
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
if test "x$GCC" = xyes ; then
|
||||
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
|
||||
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
|
||||
-Wbad-function-cast"
|
||||
case `$CC -dumpversion` in
|
||||
3.4.* | 4.*)
|
||||
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
||||
if test "x$SUNCC" = "xyes"; then
|
||||
CWARNFLAGS="-v"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(CWARNFLAGS)
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
]) # XORG_CWARNFLAGS
|
||||
|
||||
# XORG_STRICT_OPTION
|
||||
# -----------------------
|
||||
# Minimum version: 1.3.0
|
||||
#
|
||||
# Add configure option to enable strict compilation
|
||||
AC_DEFUN([XORG_STRICT_OPTION], [
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_CC_C99])
|
||||
AC_REQUIRE([XORG_CWARNFLAGS])
|
||||
|
||||
AC_ARG_ENABLE(strict-compilation,
|
||||
AS_HELP_STRING([--enable-strict-compilation],
|
||||
[Enable all warnings from compiler and make them errors (default: disabled)]),
|
||||
[STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
|
||||
if test "x$STRICT_COMPILE" = "xyes"; then
|
||||
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
||||
AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
|
||||
if test "x$GCC" = xyes ; then
|
||||
STRICT_CFLAGS="-pedantic -Werror"
|
||||
elif test "x$SUNCC" = "xyes"; then
|
||||
STRICT_CFLAGS="-errwarn"
|
||||
elif test "x$INTELCC" = "xyes"; then
|
||||
STRICT_CFLAGS="-Werror"
|
||||
fi
|
||||
fi
|
||||
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
|
||||
AC_SUBST([CWARNFLAGS])
|
||||
]) # XORG_STRICT_OPTION
|
||||
|
||||
# XORG_DEFAULT_OPTIONS
|
||||
# --------------------
|
||||
# Minimum version: 1.3.0
|
||||
#
|
||||
# Defines default options for X.Org modules.
|
||||
#
|
||||
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
|
||||
XORG_CWARNFLAGS
|
||||
XORG_STRICT_OPTION
|
||||
XORG_RELEASE_VERSION
|
||||
XORG_CHANGELOG
|
||||
XORG_MANPAGE_SECTIONS
|
||||
]) # XORG_DEFAULT_OPTIONS
|
||||
dnl Copyright 2005 Red Hat, Inc
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||
dnl documentation for any purpose is hereby granted without fee, provided that
|
||||
dnl the above copyright notice appear in all copies and that both that
|
||||
dnl copyright notice and this permission notice appear in supporting
|
||||
dnl documentation.
|
||||
dnl
|
||||
dnl The above copyright notice and this permission notice shall be included
|
||||
dnl in all copies or substantial portions of the Software.
|
||||
dnl
|
||||
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
dnl OTHER DEALINGS IN THE SOFTWARE.
|
||||
dnl
|
||||
dnl Except as contained in this notice, the name of the copyright holders shall
|
||||
dnl not be used in advertising or otherwise to promote the sale, use or
|
||||
dnl other dealings in this Software without prior written authorization
|
||||
dnl from the copyright holders.
|
||||
dnl
|
||||
|
||||
# XORG_RELEASE_VERSION
|
||||
# --------------------
|
||||
# Adds --with/without-release-string and changes the PACKAGE and
|
||||
# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
|
||||
# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also
|
||||
# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
|
||||
|
||||
AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||
AC_ARG_WITH(release-version,
|
||||
AS_HELP_STRING([--with-release-version=STRING],
|
||||
[Use release version string in package name]),
|
||||
[RELEASE_VERSION="$withval"],
|
||||
[RELEASE_VERSION=""])
|
||||
if test "x$RELEASE_VERSION" != "x"; then
|
||||
PACKAGE="$PACKAGE-$RELEASE_VERSION"
|
||||
PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
|
||||
AC_MSG_NOTICE([Building with package name set to $PACKAGE])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
|
||||
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
|
||||
[Major version of this package])
|
||||
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
|
||||
if test "x$PVM" = "x"; then
|
||||
PVM="0"
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
|
||||
[$PVM],
|
||||
[Minor version of this package])
|
||||
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
|
||||
if test "x$PVP" = "x"; then
|
||||
PVP="0"
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
|
||||
[$PVP],
|
||||
[Patch version of this package])
|
||||
])
|
||||
|
||||
# XORG_CHANGELOG()
|
||||
# ----------------
|
||||
# Minimum version: 1.2.0
|
||||
#
|
||||
# Defines the variable CHANGELOG_CMD as the command to generate
|
||||
# ChangeLog from git.
|
||||
#
|
||||
# Arrange that distcleancheck ignores ChangeLog left over by distclean.
|
||||
#
|
||||
AC_DEFUN([XORG_CHANGELOG], [
|
||||
CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
|
||||
mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
|
||||
echo 'git directory not found: installing possibly empty changelog.' >&2)"
|
||||
AC_SUBST([CHANGELOG_CMD])
|
||||
AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
|
||||
]) # XORG_CHANGELOG
|
||||
|
||||
|
@ -58,6 +58,15 @@
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Major version of this package */
|
||||
#undef PACKAGE_VERSION_MAJOR
|
||||
|
||||
/* Minor version of this package */
|
||||
#undef PACKAGE_VERSION_MINOR
|
||||
|
||||
/* Patch version of this package */
|
||||
#undef PACKAGE_VERSION_PATCHLEVEL
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
|
6468
app/xcompmgr/configure
vendored
6468
app/xcompmgr/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -2,14 +2,21 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([xcompmgr], [1.1.4], [xorg@freedesktop.org])
|
||||
AC_INIT([xcompmgr], [1.1.5], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
|
||||
AC_CONFIG_SRCDIR([xcompmgr.c])
|
||||
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS
|
||||
m4_ifndef([XORG_MACROS_VERSION],
|
||||
[m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
|
||||
XORG_MACROS_VERSION(1.3)
|
||||
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
XORG_DEFAULT_OPTIONS
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
@ -24,6 +31,7 @@ AC_FUNC_MALLOC
|
||||
AC_CHECK_FUNCS([gettimeofday localtime_r])
|
||||
|
||||
PKG_CHECK_MODULES(XCOMPMGR, xcomposite xfixes xdamage xrender)
|
||||
AC_SUBST(XCOMPMGR_CFLAGS)
|
||||
AC_SUBST(XCOMPMGR_LIBS)
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
AC_OUTPUT([Makefile])
|
||||
|
@ -3,37 +3,37 @@
|
||||
.SH NAME
|
||||
xcompmgr \- sample X compositing manager
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B xcompmgr [\-d display] [\-r radius] [\-o opacity] [\-l left-offset] [\-t top-offset] [\-acCfFnsS]
|
||||
.fi
|
||||
.BI "xcompmgr [\-d " display "] [\-r " radius "]"
|
||||
.BI "[\-o " opacity "] [\-l " left-offset "]"
|
||||
.BI "[\-t " top-offset "] [\-acCfFnsS]"
|
||||
.SH DESCRIPTION
|
||||
.B xcompmgr
|
||||
is a sample compositing manager for X servers supporting the XFIXES, DAMAGE,
|
||||
and COMPOSITE extensions. It enables basic eye-candy effects.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.BI \-d\ display
|
||||
.BI \-d\ display
|
||||
Specifies the display to manage.
|
||||
.TP
|
||||
.BI \-r\ radius
|
||||
.BI \-r\ radius
|
||||
Specifies the blur radius for client-side shadows.
|
||||
.TP
|
||||
.BI \-o\ opacity
|
||||
.BI \-o\ opacity
|
||||
Specifies the opacity for client-side shadows.
|
||||
.TP
|
||||
.BI \-l\ left-offset
|
||||
.BI \-l\ left-offset
|
||||
Specifies the left offset for client-side shadows.
|
||||
.TP
|
||||
.BI \-t\ top-offset
|
||||
.BI \-t\ top-offset
|
||||
Specifies the top offset for client-side shadows.
|
||||
.TP
|
||||
.BI \-I\ fade-in-step
|
||||
.BI \-I\ fade-in-step
|
||||
Specifies the opacity change between steps while fading in.
|
||||
.TP
|
||||
.BI \-O\ fade-out-step
|
||||
.BI \-O\ fade-out-step
|
||||
Specifies the opacity change between steps while fading out.
|
||||
.TP
|
||||
.BI \-D\ fade-delta
|
||||
.BI \-D\ fade-delta
|
||||
Specifies the time (in milliseconds) between steps in a fade.
|
||||
.TP
|
||||
.BI \-a
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: xcompmgr.c,v 1.2 2008/09/13 16:22:25 matthieu Exp $
|
||||
* $Id: xcompmgr.c,v 1.3 2009/11/08 10:14:59 matthieu Exp $
|
||||
*
|
||||
* Copyright © 2003 Keith Packard
|
||||
*
|
||||
@ -104,41 +104,41 @@ typedef struct _fade {
|
||||
Bool gone;
|
||||
} fade;
|
||||
|
||||
win *list;
|
||||
fade *fades;
|
||||
Display *dpy;
|
||||
int scr;
|
||||
Window root;
|
||||
Picture rootPicture;
|
||||
Picture rootBuffer;
|
||||
Picture blackPicture;
|
||||
Picture transBlackPicture;
|
||||
Picture rootTile;
|
||||
XserverRegion allDamage;
|
||||
Bool clipChanged;
|
||||
static win *list;
|
||||
static fade *fades;
|
||||
static Display *dpy;
|
||||
static int scr;
|
||||
static Window root;
|
||||
static Picture rootPicture;
|
||||
static Picture rootBuffer;
|
||||
static Picture blackPicture;
|
||||
static Picture transBlackPicture;
|
||||
static Picture rootTile;
|
||||
static XserverRegion allDamage;
|
||||
static Bool clipChanged;
|
||||
#if HAS_NAME_WINDOW_PIXMAP
|
||||
Bool hasNamePixmap;
|
||||
static Bool hasNamePixmap;
|
||||
#endif
|
||||
int root_height, root_width;
|
||||
ignore *ignore_head, **ignore_tail = &ignore_head;
|
||||
int xfixes_event, xfixes_error;
|
||||
int damage_event, damage_error;
|
||||
int composite_event, composite_error;
|
||||
int render_event, render_error;
|
||||
Bool synchronize;
|
||||
int composite_opcode;
|
||||
static int root_height, root_width;
|
||||
static ignore *ignore_head, **ignore_tail = &ignore_head;
|
||||
static int xfixes_event, xfixes_error;
|
||||
static int damage_event, damage_error;
|
||||
static int composite_event, composite_error;
|
||||
static int render_event, render_error;
|
||||
static Bool synchronize;
|
||||
static int composite_opcode;
|
||||
|
||||
/* find these once and be done with it */
|
||||
Atom opacityAtom;
|
||||
Atom winTypeAtom;
|
||||
Atom winDesktopAtom;
|
||||
Atom winDockAtom;
|
||||
Atom winToolbarAtom;
|
||||
Atom winMenuAtom;
|
||||
Atom winUtilAtom;
|
||||
Atom winSplashAtom;
|
||||
Atom winDialogAtom;
|
||||
Atom winNormalAtom;
|
||||
static Atom opacityAtom;
|
||||
static Atom winTypeAtom;
|
||||
static Atom winDesktopAtom;
|
||||
static Atom winDockAtom;
|
||||
static Atom winToolbarAtom;
|
||||
static Atom winMenuAtom;
|
||||
static Atom winUtilAtom;
|
||||
static Atom winSplashAtom;
|
||||
static Atom winDialogAtom;
|
||||
static Atom winNormalAtom;
|
||||
|
||||
/* opacity property name; sometime soon I'll write up an EWMH spec for it */
|
||||
#define OPACITY_PROP "_NET_WM_WINDOW_OPACITY"
|
||||
@ -146,7 +146,7 @@ Atom winNormalAtom;
|
||||
#define TRANSLUCENT 0xe0000000
|
||||
#define OPAQUE 0xffffffff
|
||||
|
||||
conv *gaussianMap;
|
||||
static conv *gaussianMap;
|
||||
|
||||
#define WINDOW_SOLID 0
|
||||
#define WINDOW_TRANS 1
|
||||
@ -176,30 +176,30 @@ get_opacity_percent(Display *dpy, win *w, double def);
|
||||
static XserverRegion
|
||||
win_extents (Display *dpy, win *w);
|
||||
|
||||
CompMode compMode = CompSimple;
|
||||
static CompMode compMode = CompSimple;
|
||||
|
||||
int shadowRadius = 12;
|
||||
int shadowOffsetX = -15;
|
||||
int shadowOffsetY = -15;
|
||||
double shadowOpacity = .75;
|
||||
static int shadowRadius = 12;
|
||||
static int shadowOffsetX = -15;
|
||||
static int shadowOffsetY = -15;
|
||||
static double shadowOpacity = .75;
|
||||
|
||||
double fade_in_step = 0.028;
|
||||
double fade_out_step = 0.03;
|
||||
int fade_delta = 10;
|
||||
int fade_time = 0;
|
||||
Bool fadeWindows = False;
|
||||
Bool excludeDockShadows = False;
|
||||
Bool fadeTrans = False;
|
||||
static double fade_in_step = 0.028;
|
||||
static double fade_out_step = 0.03;
|
||||
static int fade_delta = 10;
|
||||
static int fade_time = 0;
|
||||
static Bool fadeWindows = False;
|
||||
static Bool excludeDockShadows = False;
|
||||
static Bool fadeTrans = False;
|
||||
|
||||
Bool autoRedirect = False;
|
||||
static Bool autoRedirect = False;
|
||||
|
||||
/* For shadow precomputation */
|
||||
int Gsize = -1;
|
||||
unsigned char *shadowCorner = NULL;
|
||||
unsigned char *shadowTop = NULL;
|
||||
static int Gsize = -1;
|
||||
static unsigned char *shadowCorner = NULL;
|
||||
static unsigned char *shadowTop = NULL;
|
||||
|
||||
int
|
||||
get_time_in_milliseconds ()
|
||||
static int
|
||||
get_time_in_milliseconds (void)
|
||||
{
|
||||
struct timeval tv;
|
||||
|
||||
@ -207,7 +207,7 @@ get_time_in_milliseconds ()
|
||||
return tv.tv_sec * 1000 + tv.tv_usec / 1000;
|
||||
}
|
||||
|
||||
fade *
|
||||
static fade *
|
||||
find_fade (win *w)
|
||||
{
|
||||
fade *f;
|
||||
@ -217,10 +217,10 @@ find_fade (win *w)
|
||||
if (f->w == w)
|
||||
return f;
|
||||
}
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dequeue_fade (Display *dpy, fade *f)
|
||||
{
|
||||
fade **prev;
|
||||
@ -236,7 +236,7 @@ dequeue_fade (Display *dpy, fade *f)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
cleanup_fade (Display *dpy, win *w)
|
||||
{
|
||||
fade *f = find_fade (w);
|
||||
@ -244,7 +244,7 @@ cleanup_fade (Display *dpy, win *w)
|
||||
dequeue_fade (dpy, f);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
enqueue_fade (Display *dpy, fade *f)
|
||||
{
|
||||
if (!fades)
|
||||
@ -264,7 +264,7 @@ set_fade (Display *dpy, win *w, double start, double finish, double step,
|
||||
if (!f)
|
||||
{
|
||||
f = malloc (sizeof (fade));
|
||||
f->next = 0;
|
||||
f->next = NULL;
|
||||
f->w = w;
|
||||
f->cur = start;
|
||||
enqueue_fade (dpy, f);
|
||||
@ -302,7 +302,7 @@ set_fade (Display *dpy, win *w, double start, double finish, double step,
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
fade_timeout (void)
|
||||
{
|
||||
int now;
|
||||
@ -317,7 +317,7 @@ fade_timeout (void)
|
||||
return delta;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
run_fades (Display *dpy)
|
||||
{
|
||||
int now = get_time_in_milliseconds();
|
||||
@ -537,7 +537,7 @@ make_shadow (Display *dpy, double opacity, int width, int height)
|
||||
int opacity_int = (int)(opacity * 25);
|
||||
data = malloc (swidth * sheight * sizeof (unsigned char));
|
||||
if (!data)
|
||||
return 0;
|
||||
return NULL;
|
||||
ximage = XCreateImage (dpy,
|
||||
DefaultVisual(dpy, DefaultScreen(dpy)),
|
||||
8,
|
||||
@ -548,7 +548,7 @@ make_shadow (Display *dpy, double opacity, int width, int height)
|
||||
if (!ximage)
|
||||
{
|
||||
free (data);
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
* Build the gaussian in sections
|
||||
@ -646,21 +646,21 @@ shadow_picture (Display *dpy, double opacity, Picture alpha_pict, int width, int
|
||||
|
||||
shadowPicture = XRenderCreatePicture (dpy, shadowPixmap,
|
||||
XRenderFindStandardFormat (dpy, PictStandardA8),
|
||||
0, 0);
|
||||
0, NULL);
|
||||
if (!shadowPicture)
|
||||
{
|
||||
XDestroyImage (shadowImage);
|
||||
XFreePixmap (dpy, shadowPixmap);
|
||||
return None;
|
||||
return (Picture)None;
|
||||
}
|
||||
|
||||
gc = XCreateGC (dpy, shadowPixmap, 0, 0);
|
||||
gc = XCreateGC (dpy, shadowPixmap, 0, NULL);
|
||||
if (!gc)
|
||||
{
|
||||
XDestroyImage (shadowImage);
|
||||
XFreePixmap (dpy, shadowPixmap);
|
||||
XRenderFreePicture (dpy, shadowPicture);
|
||||
return None;
|
||||
return (Picture)None;
|
||||
}
|
||||
|
||||
XPutImage (dpy, shadowPixmap, gc, shadowImage, 0, 0, 0, 0,
|
||||
@ -674,7 +674,7 @@ shadow_picture (Display *dpy, double opacity, Picture alpha_pict, int width, int
|
||||
return shadowPicture;
|
||||
}
|
||||
|
||||
Picture
|
||||
static Picture
|
||||
solid_picture (Display *dpy, Bool argb, double a, double r, double g, double b)
|
||||
{
|
||||
Pixmap pixmap;
|
||||
@ -706,7 +706,7 @@ solid_picture (Display *dpy, Bool argb, double a, double r, double g, double b)
|
||||
return picture;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
discard_ignore (Display *dpy, unsigned long sequence)
|
||||
{
|
||||
while (ignore_head)
|
||||
@ -724,19 +724,19 @@ discard_ignore (Display *dpy, unsigned long sequence)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
set_ignore (Display *dpy, unsigned long sequence)
|
||||
{
|
||||
ignore *i = malloc (sizeof (ignore));
|
||||
if (!i)
|
||||
return;
|
||||
i->sequence = sequence;
|
||||
i->next = 0;
|
||||
i->next = NULL;
|
||||
*ignore_tail = i;
|
||||
ignore_tail = &i->next;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
should_ignore (Display *dpy, unsigned long sequence)
|
||||
{
|
||||
discard_ignore (dpy, sequence);
|
||||
@ -751,13 +751,13 @@ find_win (Display *dpy, Window id)
|
||||
for (w = list; w; w = w->next)
|
||||
if (w->id == id)
|
||||
return w;
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const char *backgroundProps[] = {
|
||||
"_XROOTPMAP_ID",
|
||||
"_XSETROOT_ID",
|
||||
0,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static Picture
|
||||
@ -906,7 +906,7 @@ static void
|
||||
paint_all (Display *dpy, XserverRegion region)
|
||||
{
|
||||
win *w;
|
||||
win *t = 0;
|
||||
win *t = NULL;
|
||||
|
||||
if (!region)
|
||||
{
|
||||
@ -927,7 +927,7 @@ paint_all (Display *dpy, XserverRegion region)
|
||||
rootBuffer = XRenderCreatePicture (dpy, rootPixmap,
|
||||
XRenderFindVisualFormat (dpy,
|
||||
DefaultVisual (dpy, scr)),
|
||||
0, 0);
|
||||
0, NULL);
|
||||
XFreePixmap (dpy, rootPixmap);
|
||||
}
|
||||
#endif
|
||||
@ -1021,7 +1021,7 @@ paint_all (Display *dpy, XserverRegion region)
|
||||
}
|
||||
if (!w->borderClip)
|
||||
{
|
||||
w->borderClip = XFixesCreateRegion (dpy, 0, 0);
|
||||
w->borderClip = XFixesCreateRegion (dpy, NULL, 0);
|
||||
XFixesCopyRegion (dpy, w->borderClip, region);
|
||||
}
|
||||
w->prev_trans = t;
|
||||
@ -1147,7 +1147,7 @@ repair_win (Display *dpy, win *w)
|
||||
else
|
||||
{
|
||||
XserverRegion o;
|
||||
parts = XFixesCreateRegion (dpy, 0, 0);
|
||||
parts = XFixesCreateRegion (dpy, NULL, 0);
|
||||
set_ignore (dpy, NextRequest (dpy));
|
||||
XDamageSubtract (dpy, w->damage, None, parts);
|
||||
XFixesTranslateRegion (dpy, parts,
|
||||
@ -1155,7 +1155,7 @@ repair_win (Display *dpy, win *w)
|
||||
w->a.y + w->a.border_width);
|
||||
if (compMode == CompServerShadows)
|
||||
{
|
||||
o = XFixesCreateRegion (dpy, 0, 0);
|
||||
o = XFixesCreateRegion (dpy, NULL, 0);
|
||||
XFixesCopyRegion (dpy, o, parts);
|
||||
XFixesTranslateRegion (dpy, o, w->shadow_dx, w->shadow_dy);
|
||||
XFixesUnionRegion (dpy, parts, parts, o);
|
||||
@ -1193,7 +1193,7 @@ map_win (Display *dpy, Window id, unsigned long sequence, Bool fade)
|
||||
w->damaged = 0;
|
||||
|
||||
if (fade && fadeWindows)
|
||||
set_fade (dpy, w, 0, get_opacity_percent (dpy, w, 1.0), fade_in_step, 0, False, True, True);
|
||||
set_fade (dpy, w, 0, get_opacity_percent (dpy, w, 1.0), fade_in_step, NULL, False, True, True);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1324,7 +1324,7 @@ get_wintype_prop(Display * dpy, Window w)
|
||||
XA_ATOM, &actual, &format,
|
||||
&n, &left, &data);
|
||||
|
||||
if (result == Success && data != None)
|
||||
if (result == Success && data != (unsigned char *)None)
|
||||
{
|
||||
Atom a;
|
||||
memcpy (&a, data, sizeof (Atom));
|
||||
@ -1355,7 +1355,7 @@ determine_mode(Display *dpy, win *w)
|
||||
|
||||
if (w->a.class == InputOnly)
|
||||
{
|
||||
format = 0;
|
||||
format = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1378,7 +1378,7 @@ determine_mode(Display *dpy, win *w)
|
||||
if (w->extents)
|
||||
{
|
||||
XserverRegion damage;
|
||||
damage = XFixesCreateRegion (dpy, 0, 0);
|
||||
damage = XFixesCreateRegion (dpy, NULL, 0);
|
||||
XFixesCopyRegion (dpy, damage, w->extents);
|
||||
add_damage (dpy, damage);
|
||||
}
|
||||
@ -1471,7 +1471,7 @@ add_win (Display *dpy, Window id, Window prev)
|
||||
new->opacity = OPAQUE;
|
||||
|
||||
new->borderClip = None;
|
||||
new->prev_trans = 0;
|
||||
new->prev_trans = NULL;
|
||||
|
||||
new->windowType = determine_wintype (dpy, new->id);
|
||||
|
||||
@ -1481,7 +1481,7 @@ add_win (Display *dpy, Window id, Window prev)
|
||||
map_win (dpy, id, new->damage_sequence - 1, True);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
restack_win (Display *dpy, win *w, Window new_above)
|
||||
{
|
||||
Window old_above;
|
||||
@ -1535,7 +1535,7 @@ configure_win (Display *dpy, XConfigureEvent *ce)
|
||||
if (w->usable)
|
||||
#endif
|
||||
{
|
||||
damage = XFixesCreateRegion (dpy, 0, 0);
|
||||
damage = XFixesCreateRegion (dpy, NULL, 0);
|
||||
if (w->extents != None)
|
||||
XFixesCopyRegion (dpy, damage, w->extents);
|
||||
}
|
||||
@ -1741,7 +1741,8 @@ static int
|
||||
error (Display *dpy, XErrorEvent *ev)
|
||||
{
|
||||
int o;
|
||||
const char *name = 0;
|
||||
const char *name = NULL;
|
||||
static char buffer[256];
|
||||
|
||||
if (should_ignore (dpy, ev->serial))
|
||||
return 0;
|
||||
@ -1772,9 +1773,17 @@ error (Display *dpy, XErrorEvent *ev)
|
||||
case BadGlyph: name ="BadGlyph"; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
printf ("error %d request %d minor %d serial %lu\n",
|
||||
ev->error_code, ev->request_code, ev->minor_code, ev->serial);
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
buffer[0] = '\0';
|
||||
XGetErrorText (dpy, ev->error_code, buffer, sizeof (buffer));
|
||||
name = buffer;
|
||||
}
|
||||
|
||||
fprintf (stderr, "error %d: %s request %d minor %d serial %lu\n",
|
||||
ev->error_code, (strlen (name) > 0) ? name : "unknown",
|
||||
ev->request_code, ev->minor_code, ev->serial);
|
||||
|
||||
/* abort (); this is just annoying to most people */
|
||||
return 0;
|
||||
@ -1845,7 +1854,7 @@ ev_window (XEvent *ev)
|
||||
void
|
||||
usage (char *program)
|
||||
{
|
||||
fprintf (stderr, "%s v1.1.4\n", program);
|
||||
fprintf (stderr, "%s v1.1.5\n", program);
|
||||
fprintf (stderr, "usage: %s [options]\n", program);
|
||||
fprintf (stderr, "Options\n");
|
||||
fprintf (stderr, " -d display\n Specifies which display should be managed.\n");
|
||||
@ -1867,22 +1876,55 @@ usage (char *program)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static void
|
||||
static Bool
|
||||
register_cm (void)
|
||||
{
|
||||
Window w;
|
||||
Atom a;
|
||||
static char net_wm_cm[] = "_NET_WM_CM_Sxx";
|
||||
|
||||
w = XCreateSimpleWindow (dpy, RootWindow (dpy, 0), 0, 0, 1, 1, 0, None,
|
||||
snprintf (net_wm_cm, sizeof (net_wm_cm), "_NET_WM_CM_S%d", scr);
|
||||
a = XInternAtom (dpy, net_wm_cm, False);
|
||||
|
||||
w = XGetSelectionOwner (dpy, a);
|
||||
if (w != None)
|
||||
{
|
||||
XTextProperty tp;
|
||||
char **strs;
|
||||
int count;
|
||||
Atom winNameAtom = XInternAtom (dpy, "_NET_WM_NAME", False);
|
||||
|
||||
if (!XGetTextProperty (dpy, w, &tp, winNameAtom) &&
|
||||
!XGetTextProperty (dpy, w, &tp, XA_WM_NAME))
|
||||
{
|
||||
fprintf (stderr,
|
||||
"Another composite manager is already running (0x%lx)\n",
|
||||
(unsigned long) w);
|
||||
return False;
|
||||
}
|
||||
if (XmbTextPropertyToTextList (dpy, &tp, &strs, &count) == Success)
|
||||
{
|
||||
fprintf (stderr,
|
||||
"Another composite manager is already running (%s)\n",
|
||||
strs[0]);
|
||||
|
||||
XFreeStringList (strs);
|
||||
}
|
||||
|
||||
XFree (tp.value);
|
||||
|
||||
return False;
|
||||
}
|
||||
|
||||
w = XCreateSimpleWindow (dpy, RootWindow (dpy, scr), 0, 0, 1, 1, 0, None,
|
||||
None);
|
||||
|
||||
Xutf8SetWMProperties (dpy, w, "xcompmgr", "xcompmgr", NULL, 0, NULL, NULL,
|
||||
NULL);
|
||||
|
||||
/* FIXME: Don't hard code the screen number */
|
||||
a = XInternAtom (dpy, "_NET_WM_CM_S0", False);
|
||||
|
||||
XSetSelectionOwner (dpy, a, w, 0);
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
int
|
||||
@ -1894,13 +1936,13 @@ main (int argc, char **argv)
|
||||
unsigned int nchildren;
|
||||
int i;
|
||||
XRenderPictureAttributes pa;
|
||||
XRectangle *expose_rects = 0;
|
||||
XRectangle *expose_rects = NULL;
|
||||
int size_expose = 0;
|
||||
int n_expose = 0;
|
||||
struct pollfd ufd;
|
||||
int p;
|
||||
int composite_major, composite_minor;
|
||||
char *display = 0;
|
||||
char *display = NULL;
|
||||
int o;
|
||||
|
||||
while ((o = getopt (argc, argv, "D:I:O:d:r:o:l:t:scnfFCaS")) != -1)
|
||||
@ -2006,7 +2048,10 @@ main (int argc, char **argv)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
register_cm();
|
||||
if (!register_cm())
|
||||
{
|
||||
exit (1);
|
||||
}
|
||||
|
||||
/* get atoms */
|
||||
opacityAtom = XInternAtom (dpy, OPACITY_PROP, False);
|
||||
@ -2163,7 +2208,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
if (fadeTrans)
|
||||
set_fade (dpy, w, w->opacity*1.0/OPAQUE, get_opacity_percent (dpy, w, 1.0),
|
||||
fade_out_step, 0, False, True, False);
|
||||
fade_out_step, NULL, False, True, False);
|
||||
else
|
||||
{
|
||||
w->opacity = get_opacity_prop(dpy, w, OPAQUE);
|
||||
|
Loading…
Reference in New Issue
Block a user