File compiz-metacity-3.20.patch of Package compiz
--- a/gtk/CMakeLists.txt
+++ b/gtk/CMakeLists.txt
@@ -25,7 +25,14 @@ if (USE_GTK)
set (CMAKE_REQUIRED_LIBRARIES "")
if (USE_METACITY)
- pkg_check_modules (METACITY libmetacity-private>=3.16.0)
+ pkg_check_modules (METACITY libmetacity-private>=3.20.0)
+
+ if (METACITY_FOUND)
+ compiz_pkg_check_modules (HAVE_METACITY_3_20_0 libmetacity>=3.20.0)
+ else (METACITY_FOUND)
+ pkg_check_modules (METACITY libmetacity-private>=3.16.0)
+ endif (METACITY_FOUND)
+
if (NOT METACITY_FOUND)
compiz_set (USE_METACITY 0)
endif (NOT METACITY_FOUND)
--- a/gtk/config.h.gtk.in
+++ b/gtk/config.h.gtk.in
@@ -1,4 +1,7 @@
/* Define to 1 if Metacity support is enabled */
#cmakedefine USE_METACITY 1
+/* Define to 1 if Metacity version >= 3.20.0 */
+#cmakedefine HAVE_METACITY_3_20_0 1
+
#define GETTEXT_PACKAGE "${GETTEXT_PACKAGE}"
--- a/gtk/window-decorator/gwd-settings-storage.c
+++ b/gtk/window-decorator/gwd-settings-storage.c
@@ -29,7 +29,11 @@
static const gchar * ORG_COMPIZ_GWD = "org.compiz.gwd";
static const gchar * ORG_GNOME_DESKTOP_WM_PREFERENCES = "org.gnome.desktop.wm.preferences";
+#ifdef HAVE_METACITY_3_20_0
+static const gchar * ORG_GNOME_METACITY = "org.gnome.metacity.theme";
+#else
static const gchar * ORG_GNOME_METACITY = "org.gnome.metacity";
+#endif
static const gchar * ORG_MATE_MARCO_GENERAL = "org.mate.Marco.general";
static const gchar * ORG_COMPIZ_GWD_KEY_USE_TOOLTIPS = "use-tooltips";
@@ -41,7 +45,11 @@ static const gchar * ORG_COMPIZ_GWD_KEY_
static const gchar * ORG_COMPIZ_GWD_KEY_USE_METACITY_THEME = "use-metacity-theme";
static const gchar * ORG_COMPIZ_GWD_KEY_MOUSE_WHEEL_ACTION = "mouse-wheel-action";
+#ifdef HAVE_METACITY_3_20_0
+static const gchar * ORG_GNOME_METACITY_THEME = "name";
+#else
static const gchar * ORG_GNOME_METACITY_THEME = "theme";
+#endif
static const gchar * ORG_GNOME_DESKTOP_WM_PREFERENCES_ACTION_DOUBLE_CLICK_TITLEBAR = "action-double-click-titlebar";
static const gchar * ORG_GNOME_DESKTOP_WM_PREFERENCES_ACTION_MIDDLE_CLICK_TITLEBAR = "action-middle-click-titlebar";
--- a/gtk/window-decorator/gwd-theme-metacity.c
+++ b/gtk/window-decorator/gwd-theme-metacity.c
@@ -27,7 +27,9 @@
#include "config.h"
+#ifndef HAVE_METACITY_3_20_0
#include <metacity-private/theme-parser.h>
+#endif
#include "gtk-window-decorator.h"
#include "gwd-settings.h"