[gnome-flashback/wip/muktupavels/compiz: 46/46] data: install compiz configuration
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/wip/muktupavels/compiz: 46/46] data: install compiz configuration
- Date: Mon, 28 Oct 2019 14:09:36 +0000 (UTC)
commit bc7057400ae91c5935726363cd643c3a73d2e2e8
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Feb 17 16:09:38 2019 +0200
data: install compiz configuration
configure.ac | 32 ++++++++++++++++++++++++++++++++
data/Makefile.am | 25 +++++++++++++++++--------
data/compizconfig/Makefile.am | 24 ++++++++++++++++++++++++
data/compizconfig/gnome-flashback.conf | 5 +++++
data/compizconfig/gnome-flashback.ini | 2 ++
data/sessions/Makefile.am | 19 ++++++++++++-------
data/xsessions/Makefile.am | 10 ++++++++--
gnome-flashback/gf-main.c | 3 +++
8 files changed, 103 insertions(+), 17 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5fd41c7..739796b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -297,6 +297,35 @@ AS_IF([test "x$enable_systemd_session" = "xyes"], [
AM_CONDITIONAL([ENABLE_SYSTEMD_SESSION], [test "x$enable_systemd_session" = "xyes"])
AC_SUBST([HIDDEN_UNDER_SYSTEMD])
+dnl **************************************************************************
+dnl Compiz session
+dnl **************************************************************************
+
+AC_ARG_WITH([compiz-session],
+ [AS_HELP_STRING([--with-compiz-session], [build with Compiz session support])],
+ [with_compiz_session="$withval"], [with_compiz_session="auto"])
+
+AS_IF([test "x$with_compiz_session" != "xno"], [
+ PKG_CHECK_EXISTS([libcompizconfig >= 0.9.14.0],
+ [found_compiz="yes"], [found_compiz="no"])
+
+ AS_IF([test "x$found_compiz" = "xyes"], [
+ AC_DEFINE([HAVE_COMPIZ_SESSION], [1], [Define if built with compiz session support])
+
+ COMPIZCONFIG_CONFIG_DIR=`$PKG_CONFIG --variable=configdir libcompizconfig`
+ AC_SUBST([COMPIZCONFIG_CONFIG_DIR], [$COMPIZCONFIG_CONFIG_DIR])
+
+ COMPIZCONFIG_UPGRADES_DIR=`$PKG_CONFIG --variable=upgradesdir libcompizconfig`
+ AC_SUBST([COMPIZCONFIG_UPGRADES_DIR], [$COMPIZCONFIG_UPGRADES_DIR])
+ ], [
+ AS_IF([test "x$with_compiz_session" = "xyes"], [
+ AC_MSG_ERROR([Compiz session requested but libcompizconfig not found])
+ ])
+ ])
+], [found_compiz=no])
+
+AM_CONDITIONAL(WITH_COMPIZ_SESSION, [test "x$found_compiz" = "xyes"])
+
dnl **************************************************************************
dnl Process .in files
dnl **************************************************************************
@@ -309,6 +338,7 @@ AC_CONFIG_FILES([
data/Makefile
data/applications/Makefile
data/autostart/Makefile
+ data/compizconfig/Makefile
data/directories/Makefile
data/menus/Makefile
data/schemas/Makefile
@@ -368,3 +398,5 @@ echo " libdir ......................: ${libdir}"
echo " sysconfdir ..................: ${sysconfdir}"
echo " libexecdir ..................: ${libexecdir}"
echo ""
+echo " Compiz session ..............: ${found_compiz}"
+echo ""
diff --git a/data/Makefile.am b/data/Makefile.am
index 51c2ed1..e9227de 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -3,6 +3,7 @@ NULL =
SUBDIRS = \
applications \
autostart \
+ compizconfig \
directories \
menus \
schemas \
@@ -14,7 +15,6 @@ SUBDIRS = \
$(NULL)
libexec_SCRIPTS = \
- gnome-flashback-compiz \
gnome-flashback-metacity \
$(NULL)
@@ -24,28 +24,37 @@ else
session_management=--builtin
endif
-gnome-flashback-compiz: Makefile
+gnome-flashback-metacity: Makefile
$(AM_V_GEN) (echo '#!/bin/sh' && echo '' && \
echo 'if [ -z $$XDG_CURRENT_DESKTOP ]; then' && \
echo ' export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"' && \
echo 'fi' && echo '' && \
echo -n 'exec gnome-session $(session_management) ' && \
- echo '--session=gnome-flashback-compiz "$$@"') > $@
+ echo -n '--session=gnome-flashback-metacity ' && \
+ echo '--disable-acceleration-check "$$@"') > $@
$(AM_V_at) chmod a+x $@
-gnome-flashback-metacity: Makefile
+CLEANFILES = \
+ gnome-flashback-metacity \
+ $(NULL)
+
+if WITH_COMPIZ_SESSION
+libexec_SCRIPTS += \
+ gnome-flashback-compiz \
+ $(NULL)
+
+gnome-flashback-compiz: Makefile
$(AM_V_GEN) (echo '#!/bin/sh' && echo '' && \
echo 'if [ -z $$XDG_CURRENT_DESKTOP ]; then' && \
echo ' export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"' && \
echo 'fi' && echo '' && \
echo -n 'exec gnome-session $(session_management) ' && \
- echo -n '--session=gnome-flashback-metacity ' && \
- echo '--disable-acceleration-check "$$@"') > $@
+ echo '--session=gnome-flashback-compiz "$$@"') > $@
$(AM_V_at) chmod a+x $@
-CLEANFILES = \
+CLEANFILES += \
gnome-flashback-compiz \
- gnome-flashback-metacity \
$(NULL)
+endif
-include $(top_srcdir)/git.mk
diff --git a/data/compizconfig/Makefile.am b/data/compizconfig/Makefile.am
new file mode 100644
index 0000000..7542278
--- /dev/null
+++ b/data/compizconfig/Makefile.am
@@ -0,0 +1,24 @@
+NULL =
+
+config_files = \
+ gnome-flashback.conf \
+ gnome-flashback.ini \
+ $(NULL)
+
+upgrade_files = \
+ $(NULL)
+
+if WITH_COMPIZ_SESSION
+configdir = $(COMPIZCONFIG_CONFIG_DIR)
+config_DATA = $(config_files)
+
+upgradedir = $(COMPIZCONFIG_UPGRADES_DIR)
+upgrade_DATA = $(upgrade_files)
+endif
+
+EXTRA_DIST = \
+ $(config_files) \
+ $(upgrade_files) \
+ $(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/compizconfig/gnome-flashback.conf b/data/compizconfig/gnome-flashback.conf
new file mode 100644
index 0000000..7ec7206
--- /dev/null
+++ b/data/compizconfig/gnome-flashback.conf
@@ -0,0 +1,5 @@
+[general_gnome-flashback]
+backend = gsettings
+integration = true
+plugin_list_autosort = true
+profile = gnome-flashback
diff --git a/data/compizconfig/gnome-flashback.ini b/data/compizconfig/gnome-flashback.ini
new file mode 100644
index 0000000..be08d56
--- /dev/null
+++ b/data/compizconfig/gnome-flashback.ini
@@ -0,0 +1,2 @@
+[core]
+s0_active_plugins =
animation;commands;compiztoolbox;composite;core;decor;expo;ezoom;fade;gnomecompat;grid;imgpng;mousepoll;move;opengl;place;regex;resize;scale;session;snap;vpswitch;wall
diff --git a/data/sessions/Makefile.am b/data/sessions/Makefile.am
index 89b03ab..fcfcf11 100644
--- a/data/sessions/Makefile.am
+++ b/data/sessions/Makefile.am
@@ -39,12 +39,6 @@ space = $(NULL) $(NULL)
compiz = $(subst $(space),;,$(strip $(required_components_compiz)))
metacity = $(subst $(space),;,$(strip $(required_components_metacity)))
-gnome-flashback-compiz.session: Makefile.am gnome-flashback.session.in
- $(AM_V_GEN) sed \
- -e 's,[@]NAME[@],Compiz,g' \
- -e 's,[@]REQUIRED_COMPONENTS[@],$(compiz),g' \
- < $(srcdir)/gnome-flashback.session.in > $@
-
gnome-flashback-metacity.session: Makefile.am gnome-flashback.session.in
$(AM_V_GEN) sed \
-e 's,[@]NAME[@],Metacity,g' \
@@ -52,10 +46,21 @@ gnome-flashback-metacity.session: Makefile.am gnome-flashback.session.in
< $(srcdir)/gnome-flashback.session.in > $@
sessions = \
- gnome-flashback-compiz.session \
gnome-flashback-metacity.session \
$(NULL)
+if WITH_COMPIZ_SESSION
+gnome-flashback-compiz.session: Makefile.am gnome-flashback.session.in
+ $(AM_V_GEN) sed \
+ -e 's,[@]NAME[@],Compiz,g' \
+ -e 's,[@]REQUIRED_COMPONENTS[@],$(compiz),g' \
+ < $(srcdir)/gnome-flashback.session.in > $@
+
+sessions += \
+ gnome-flashback-compiz.session \
+ $(NULL)
+endif
+
sessiondir = $(datadir)/gnome-session/sessions
session_DATA = $(sessions)
diff --git a/data/xsessions/Makefile.am b/data/xsessions/Makefile.am
index 5e36dbd..a808885 100644
--- a/data/xsessions/Makefile.am
+++ b/data/xsessions/Makefile.am
@@ -1,10 +1,15 @@
NULL =
xsession_in_in_files = \
- gnome-flashback-compiz.desktop.in.in \
gnome-flashback-metacity.desktop.in.in \
$(NULL)
+if WITH_COMPIZ_SESSION
+xsession_in_in_files += \
+ gnome-flashback-compiz.desktop.in.in \
+ $(NULL)
+endif
+
xsessiondir = $(datadir)/xsessions
xsession_in_files = $(xsession_in_in_files:.desktop.in.in=.desktop.in)
xsession_DATA = $(xsession_in_files:.desktop.in=.desktop)
@@ -17,7 +22,8 @@ xsession_DATA = $(xsession_in_files:.desktop.in=.desktop)
-d $(top_srcdir)/po && mv $@-t $@
EXTRA_DIST = \
- $(xsession_in_in_files) \
+ gnome-flashback-compiz.desktop.in.in \
+ gnome-flashback-metacity.desktop.in.in \
$(NULL)
CLEANFILES = \
diff --git a/gnome-flashback/gf-main.c b/gnome-flashback/gf-main.c
index 9210754..1e25524 100644
--- a/gnome-flashback/gf-main.c
+++ b/gnome-flashback/gf-main.c
@@ -124,6 +124,9 @@ session_ready_cb (GfSession *session,
application = gf_application_new ();
gf_session_set_environment (session, "XDG_MENU_PREFIX", "gnome-flashback-");
+#ifdef HAVE_COMPIZ_SESSION
+ gf_session_set_environment (session, "COMPIZ_CONFIG_PROFILE", "gnome-flashback");
+#endif
gf_session_register (session);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]