diff --git a/compiz-0.7.6-metacity-spacer.patch b/compiz-0.7.6-metacity-spacer.patch new file mode 100644 index 0000000..e1b4858 --- /dev/null +++ b/compiz-0.7.6-metacity-spacer.patch @@ -0,0 +1,216 @@ +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 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); + } + } diff --git a/compiz.spec b/compiz.spec index 4c97ff0..fbfbfaf 100644 --- a/compiz.spec +++ b/compiz.spec @@ -14,7 +14,7 @@ URL: http://www.go-compiz.org License: GPLv2+ and LGPLv2+ and MIT Group: User Interface/Desktops Version: 0.7.6 -Release: 11%{?dist} +Release: 14%{?dist} Summary: OpenGL window and compositing manager BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -61,6 +61,7 @@ Patch106: redhat-logo.patch #Patch110: scale-key.patch # upstream commit 45caca2220f75bfd20074c217ebee10825413547 Patch111: compiz-0.7.6-decoration-size.patch +Patch112: compiz-0.7.6-metacity-spacer.patch %description Compiz is one of the first OpenGL-accelerated compositing window @@ -134,6 +135,7 @@ popd %endif #%patch110 -p1 -b .scale-key %patch111 -p1 -b .decoration-size +%patch112 -p1 -b .metacity-spacer %build rm -rf $RPM_BUILD_ROOT @@ -345,6 +347,15 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Oct 22 2008 Adel Gadllah - 0.7.6-14 +- Add missing bits to the patch (RH #446457) + +* Fri Oct 17 2008 Adel Gadllah - 0.7.6-13 +- Patch configure rather than configure.ac + +* Wed Oct 15 2008 Adel Gadllah - 0.7.6-12 +- Backport upstream patch to fix RH #446457 + * Thu Sep 25 2008 Jon McCann - 0.7.6-11 - Add compiz-gtk driver script and desktop file - New desktop effects release