compiz/compiz-0.7.6-metacity-space...

217 lines
6.2 KiB
Diff

Nur in compiz-0.7.6: autom4te.cache.
diff -ur compiz-0.7.6.orign/config.h.in compiz-0.7.6/config.h.in
--- compiz-0.7.6.orign/config.h.in 2008-05-29 14:07:46.000000000 +0200
+++ compiz-0.7.6/config.h.in 2008-10-22 16:31:36.000000000 +0200
@@ -45,6 +45,9 @@
/* Define to 1 if metacity version >= 2.17.0 */
#undef HAVE_METACITY_2_17_0
+/* Define to 1 if metacity version >= 2.23.2 */
+#undef HAVE_METACITY_2_23_2
+
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
diff -ur compiz-0.7.6.orign/configure compiz-0.7.6/configure
--- compiz-0.7.6.orign/configure 2008-05-29 14:07:30.000000000 +0200
+++ compiz-0.7.6/configure 2008-10-17 21:05:36.000000000 +0200
@@ -25047,6 +25047,16 @@
else
have_metacity_2_17_0=no
fi
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libmetacity-private >= 2.23.2\"") >&5
+ ($PKG_CONFIG --exists --print-errors "libmetacity-private >= 2.23.2") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ have_metacity_2_23_2=yes
+else
+ have_metacity_2_23_2=no
+fi
fi
if test "x$use_gnome" = "xyes"; then
@@ -25270,6 +25280,13 @@
_ACEOF
fi
+ if test "$have_metacity_2_23_2" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_METACITY_2_23_2 1
+_ACEOF
+
+ fi
fi
if test "x$use_gnome" = "xyes"; then
diff -ur compiz-0.7.6.orign/configure.ac compiz-0.7.6/configure.ac
--- compiz-0.7.6.orign/configure.ac 2008-05-29 14:05:16.000000000 +0200
+++ compiz-0.7.6/configure.ac 2008-10-17 21:05:10.000000000 +0200
@@ -326,6 +326,8 @@
[have_metacity_2_15_21=yes], [have_metacity_2_15_21=no])
PKG_CHECK_EXISTS(libmetacity-private >= 2.17.0,
[have_metacity_2_17_0=yes], [have_metacity_2_17_0=no])
+ PKG_CHECK_EXISTS(libmetacity-private >= 2.23.2,
+ [have_metacity_2_23_2=yes], [have_metacity_2_23_2=no])
fi
if test "x$use_gnome" = "xyes"; then
@@ -379,6 +381,10 @@
AC_DEFINE(HAVE_METACITY_2_17_0, 1,
[Define to 1 if metacity version >= 2.17.0])
fi
+ if test "$have_metacity_2_23_2" = yes; then
+ AC_DEFINE(HAVE_METACITY_2_23_2, 1,
+ [Define to 1 if metacity version >= 2.23.2])
+ fi
fi
AM_CONDITIONAL(USE_GNOME, test "x$use_gnome" = "xyes")
diff -ur compiz-0.7.6.orign/gtk/window-decorator/gtk-window-decorator.c compiz-0.7.6/gtk/window-decorator/gtk-window-decorator.c
--- compiz-0.7.6.orign/gtk/window-decorator/gtk-window-decorator.c 2008-05-29 13:58:33.000000000 +0200
+++ compiz-0.7.6/gtk/window-decorator/gtk-window-decorator.c 2008-10-22 16:38:56.000000000 +0200
@@ -5949,11 +5949,17 @@
if (sides[0] != NULL)
{
- gboolean used[META_BUTTON_FUNCTION_LAST];
char **buttons;
int b;
+ gboolean used[META_BUTTON_FUNCTION_LAST];
- memset (used, 0, sizeof (used));
+ for (i = 0; i < META_BUTTON_FUNCTION_LAST; i++)
+ {
+ used[i] = FALSE;
+#ifdef HAVE_METACITY_2_23_2
+ new_layout.left_buttons_has_spacer[i] = FALSE;
+#endif
+ }
buttons = g_strsplit (sides[0], ",", -1);
@@ -5961,54 +5967,90 @@
while (buttons[b] != NULL)
{
f = meta_button_function_from_string (buttons[b]);
- if (f != META_BUTTON_FUNCTION_LAST && !used[f])
- {
- new_layout.left_buttons[i++] = f;
- used[f] = TRUE;
-
- f = meta_button_opposite_function (f);
- if (f != META_BUTTON_FUNCTION_LAST)
- new_layout.left_buttons[i++] = f;
- }
+#ifdef HAVE_METACITY_2_23_2
+ if (i > 0 && strcmp("spacer", buttons[b]) == 0)
+ {
+ new_layout.left_buttons_has_spacer[i - 1] = TRUE;
+ f = meta_button_opposite_function (f);
+
+ if (f != META_BUTTON_FUNCTION_LAST)
+ new_layout.left_buttons_has_spacer[i - 2] = TRUE;
+ }
else
+#endif
{
- fprintf (stderr, "%s: Ignoring unknown or already-used "
- "button name \"%s\"\n", program_name, buttons[b]);
+ if (f != META_BUTTON_FUNCTION_LAST && !used[f])
+ {
+ used[f] = TRUE;
+ new_layout.left_buttons[i++] = f;
+
+ f = meta_button_opposite_function (f);
+
+ if (f != META_BUTTON_FUNCTION_LAST)
+ new_layout.left_buttons[i++] = f;
+
+ }
+ else
+ {
+ fprintf (stderr, "%s: Ignoring unknown or already-used "
+ "button name \"%s\"\n", program_name, buttons[b]);
+ }
}
-
b++;
}
+ new_layout.left_buttons[i] = META_BUTTON_FUNCTION_LAST;
+
g_strfreev (buttons);
if (sides[1] != NULL)
{
- memset (used, 0, sizeof (used));
+ for (i = 0; i < META_BUTTON_FUNCTION_LAST; i++)
+ {
+ used[i] = FALSE;
+#ifdef HAVE_METACITY_2_23_2
+ new_layout.right_buttons_has_spacer[i] = FALSE;
+#endif
+ }
buttons = g_strsplit (sides[1], ",", -1);
i = b = 0;
while (buttons[b] != NULL)
{
- f = meta_button_function_from_string (buttons[b]);
- if (f != META_BUTTON_FUNCTION_LAST && !used[f])
- {
- new_layout.right_buttons[i++] = f;
- used[f] = TRUE;
-
- f = meta_button_opposite_function (f);
- if (f != META_BUTTON_FUNCTION_LAST)
- new_layout.right_buttons[i++] = f;
- }
- else
- {
- fprintf (stderr, "%s: Ignoring unknown or already-used "
- "button name \"%s\"\n", program_name, buttons[b]);
- }
-
- b++;
+ f = meta_button_function_from_string (buttons[b]);
+#ifdef HAVE_METACITY_2_23_2
+ if (i > 0 && strcmp("spacer", buttons[b]) == 0)
+ {
+ new_layout.right_buttons_has_spacer[i - 1] = TRUE;
+ f = meta_button_opposite_function (f);
+ if (f != META_BUTTON_FUNCTION_LAST)
+ new_layout.right_buttons_has_spacer[i - 2] = TRUE;
+ }
+ else
+#endif
+ {
+ if (f != META_BUTTON_FUNCTION_LAST && !used[f])
+ {
+ used[f] = TRUE;
+ new_layout.right_buttons[i++] = f;
+
+ f = meta_button_opposite_function (f);
+
+ if (f != META_BUTTON_FUNCTION_LAST)
+ new_layout.right_buttons[i++] = f;
+ }
+ else
+ {
+ fprintf (stderr, "%s: Ignoring unknown or "
+ "already-used button name \"%s\"\n",
+ program_name, buttons[b]);
+ }
+ }
+ b++;
}
-
+ new_layout.right_buttons[i] = META_BUTTON_FUNCTION_LAST;
+
g_strfreev (buttons);
}
}