Author: glen Date: Sat Apr 28 18:47:09 2012 GMT Module: packages Tag: HEAD ---- Log message: - new, based on fedora pkg
---- Files affected: packages/muffin: muffin.spec (NONE -> 1.1) (NEW), rat4_gtk33.patch (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/muffin/muffin.spec diff -u /dev/null packages/muffin/muffin.spec:1.1 --- /dev/null Sat Apr 28 20:47:09 2012 +++ packages/muffin/muffin.spec Sat Apr 28 20:47:03 2012 @@ -0,0 +1,163 @@ +# $Revision$, $Date$ +%define _internel_version 08ffc65 +Summary: Window and compositing manager based on Clutter +Name: muffin +Version: 1.0.2 +Release: 1 +License: GPL v2+ +Group: X11/Applications +URL: https://github.com/linuxmint/muffin +Source0: https://github.com/linuxmint/muffin/tarball/%{version}/%{name}-%{version}.tar.gz +# Source0-md5: 7da13590ceb8677209c15d1f2d9e024f +# https://github.com/linuxmint/muffin/issues/9 +# https://github.com/rat4/muffin/compare/gtk_3.3 +Patch0: rat4_gtk33.patch +BuildRequires: GConf2-devel +BuildRequires: clutter-devel >= 1.5.8 +BuildRequires: desktop-file-utils +BuildRequires: gnome-doc-utils +BuildRequires: gobject-introspection-devel +BuildRequires: gtk+3-devel >= 2.99.0 +BuildRequires: pango-devel +BuildRequires: pkgconfig +BuildRequires: startup-notification-devel +BuildRequires: xorg-lib-libSM-devel +BuildRequires: xorg-lib-libX11-devel +BuildRequires: xorg-lib-libXcomposite-devel +BuildRequires: xorg-lib-libXcursor-devel +BuildRequires: xorg-lib-libXdamage-devel +BuildRequires: xorg-lib-libXext-devel +BuildRequires: xorg-lib-libXrandr-devel +BuildRequires: xorg-lib-libXrender-devel +BuildRequires: zenity +# Bootstrap requirements +BuildRequires: gnome-common +BuildRequires: gtk-doc +BuildRequires: intltool +BuildRequires: libcanberra-devel +Requires: GConf2 +#Requires: control-center-filesystem +Requires: dbus-x11 +Requires: startup-notification +Requires: zenity +Requires(post): /sbin/ldconfig +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +Muffin is a window and compositing manager that displays and manages +your desktop via OpenGL. Muffin combines a sophisticated display +engine using the Clutter toolkit with solid window-management logic +inherited from the Metacity window manager. + +While Muffin can be used stand-alone, it is primarily intended to be +used as the display core of a larger system such as Cinnamon. For this +reason, Muffin is very extensible via plugins, which are used both to +add fancy visual effects and to rework the window management behaviors +to meet the needs of the environment. + +%package devel +Summary: Development package for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +Header files and libraries for developing Muffin plugins. Also +includes utilities for testing Metacity/Muffin themes. + +%prep +%setup -q -n linuxmint-%{name}-%{_internel_version} +%patch0 -p1 + +%build +%{__libtoolize} +%{__aclocal} +%{__autoconf} +%{__autoheader} +%{__automake} +%configure \ + --disable-static \ + --enable-compile-warnings=minimum \ + +SHOULD_HAVE_DEFINED="HAVE_SM HAVE_XINERAMA HAVE_XFREE_XINERAMA HAVE_SHAPE HAVE_RANDR HAVE_STARTUP_NOTIFICATION HAVE_COMPOSITE_EXTENSION" + +for I in $SHOULD_HAVE_DEFINED; do + if ! grep -q "define $I" config.h; then + echo "$I was not defined in config.h" + grep "$I" config.h + exit 1 + else + echo "$I was defined as it should have been" + grep "$I" config.h + fi +done + +%{__make} V=1 + +%install +rm -rf $RPM_BUILD_ROOT +%{__make} install \ + GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 \ + DESTDIR=$RPM_BUILD_ROOT + +# Remove libtool archives. +%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la + +%find_lang %{name} + +# Muffin contains a .desktop file so we just need to validate it +desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +/sbin/ldconfig +%gconf_schema_install muffin.schemas + +%preun +%gconf_schema_uninstall muffin.schemas + +%postun -p /sbin/ldconfig + +%files -f %{name}.lang +%defattr(644,root,root,755) +%doc README AUTHORS NEWS HACKING doc/theme-format.txt +%{_sysconfdir}/gconf/schemas/muffin.schemas +%attr(755,root,root) %{_bindir}/muffin +%attr(755,root,root) %{_bindir}/muffin-message +%{_mandir}/man1/muffin.1* +%{_mandir}/man1/muffin-message.1* +%{_desktopdir}/muffin.desktop +%dir %{_datadir}/muffin +%attr(755,root,root) %{_libdir}/libmuffin.so.*.*.* +%ghost %{_libdir}/libmuffin.so.0 +%{_libdir}/muffin/Meta-3.0.gir +%{_libdir}/muffin/Meta-3.0.typelib +%dir %{_libdir}/muffin +%dir %{_libdir}/muffin/plugins +%{_libdir}/muffin/plugins/default.so + +# XXX: nothing uses this? +%dir %{_datadir}/gnome/wm-properties +%{_datadir}/gnome/wm-properties/muffin-wm.desktop + +%files devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/muffin-theme-viewer +%attr(755,root,root) %{_bindir}/muffin-window-demo +%{_includedir}/muffin +%{_libdir}/libmuffin.so +%{_datadir}/muffin/icons/muffin-window-demo.png +%{_pkgconfigdir}/libmuffin.pc +%{_pkgconfigdir}/muffin-plugins.pc +%{_mandir}/man1/muffin-theme-viewer.1* +%{_mandir}/man1/muffin-window-demo.1* + +%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) +%changelog +* %{date} PLD Team <[email protected]> +All persons listed below can be reached at <cvs_login>@pld-linux.org + +$Log$ +Revision 1.1 2012/04/28 18:47:03 glen +- new, based on fedora pkg ================================================================ Index: packages/muffin/rat4_gtk33.patch diff -u /dev/null packages/muffin/rat4_gtk33.patch:1.1 --- /dev/null Sat Apr 28 20:47:09 2012 +++ packages/muffin/rat4_gtk33.patch Sat Apr 28 20:47:03 2012 @@ -0,0 +1,1497 @@ +diff -urp linuxmint-muffin-0e57527/configure.in rat4-muffin-80db11c/configure.in +--- a/configure.in 2012-03-10 15:13:14.000000000 +0000 ++++ b/configure.in 2012-03-12 02:40:04.000000000 +0000 +@@ -61,7 +61,7 @@ AC_CHECK_SIZEOF(__int64) + ## byte order + AC_C_BIGENDIAN + +-GTK_MIN_VERSION=2.91.7 ++GTK_MIN_VERSION=3.3.3 + CANBERRA_GTK=libcanberra-gtk3 + CANBERRA_GTK_VERSION=0.26 + +diff -urp linuxmint-muffin-0e57527/src/compositor/meta-background-actor.c rat4-muffin-80db11c/src/compositor/meta-background-actor.c +--- a/src/compositor/meta-background-actor.c 2012-03-10 15:13:14.000000000 +0000 ++++ b/src/compositor/meta-background-actor.c 2012-03-12 02:40:04.000000000 +0000 +@@ -28,6 +28,9 @@ + #define COGL_ENABLE_EXPERIMENTAL_API + #include <cogl/cogl-texture-pixmap-x11.h> + ++#define CLUTTER_ENABLE_EXPERIMENTAL_API ++#include <clutter/clutter.h> ++ + #include <X11/Xatom.h> + + #include "cogl-utils.h" +@@ -537,9 +540,11 @@ meta_background_actor_update (MetaScreen + if (root_pixmap_id != None) + { + CoglHandle texture; ++ CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ()); ++ GError *error = NULL; + + meta_error_trap_push (display); +- texture = cogl_texture_pixmap_x11_new (root_pixmap_id, FALSE); ++ texture = cogl_texture_pixmap_x11_new (ctx, root_pixmap_id, FALSE, &error); + meta_error_trap_pop (display); + + if (texture != COGL_INVALID_HANDLE) +@@ -550,6 +555,12 @@ meta_background_actor_update (MetaScreen + background->have_pixmap = True; + return; + } ++ else ++ { ++ g_warning ("Failed to create background texture from pixmap: %s", ++ error->message); ++ g_error_free (error); ++ } + } + + background->have_pixmap = False; +diff -urp linuxmint-muffin-0e57527/src/compositor/meta-shaped-texture.c rat4-muffin-80db11c/src/compositor/meta-shaped-texture.c +--- a/src/compositor/meta-shaped-texture.c 2012-03-10 15:13:14.000000000 +0000 ++++ b/src/compositor/meta-shaped-texture.c 2012-03-12 02:40:04.000000000 +0000 +@@ -25,32 +25,38 @@ + + #include <config.h> + +-#include "meta-shaped-texture.h" ++#define CLUTTER_ENABLE_EXPERIMENTAL_API ++#define COGL_ENABLE_EXPERIMENTAL_API ++ ++#include <meta/meta-shaped-texture.h> + #include "meta-texture-tower.h" + #include "meta-texture-rectangle.h" + + #include <clutter/clutter.h> + #include <cogl/cogl.h> ++#include <cogl/cogl-texture-pixmap-x11.h> + #include <string.h> + + static void meta_shaped_texture_dispose (GObject *object); +-static void meta_shaped_texture_notify (GObject *object, +- GParamSpec *pspec); + + static void meta_shaped_texture_paint (ClutterActor *actor); + static void meta_shaped_texture_pick (ClutterActor *actor, + const ClutterColor *color); + +-static void meta_shaped_texture_update_area (ClutterX11TexturePixmap *texture, +- int x, +- int y, +- int width, +- int height); ++static void meta_shaped_texture_get_preferred_width (ClutterActor *self, ++ gfloat for_height, ++ gfloat *min_width_p, ++ gfloat *natural_width_p); ++ ++static void meta_shaped_texture_get_preferred_height (ClutterActor *self, ++ gfloat for_width, ++ gfloat *min_height_p, ++ gfloat *natural_height_p); + + static void meta_shaped_texture_dirty_mask (MetaShapedTexture *stex); + + G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture, +- CLUTTER_X11_TYPE_TEXTURE_PIXMAP); ++ CLUTTER_TYPE_ACTOR); + + #define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \ +@@ -59,6 +65,8 @@ G_DEFINE_TYPE (MetaShapedTexture, meta_s + struct _MetaShapedTexturePrivate + { + MetaTextureTower *paint_tower; ++ Pixmap pixmap; ++ CoglHandle texture; + CoglHandle mask_texture; + CoglHandle material; + CoglHandle material_unshaped; +@@ -71,6 +79,7 @@ struct _MetaShapedTexturePrivate + + cairo_region_t *visible_pixels_region; + ++ guint tex_width, tex_height; + guint mask_width, mask_height; + + guint create_mipmaps : 1; +@@ -81,16 +90,14 @@ meta_shaped_texture_class_init (MetaShap + { + GObjectClass *gobject_class = (GObjectClass *) klass; + ClutterActorClass *actor_class = (ClutterActorClass *) klass; +- ClutterX11TexturePixmapClass *x11_texture_class = (ClutterX11TexturePixmapClass *) klass; + + gobject_class->dispose = meta_shaped_texture_dispose; +- gobject_class->notify = meta_shaped_texture_notify; + ++ actor_class->get_preferred_width = meta_shaped_texture_get_preferred_width; ++ actor_class->get_preferred_height = meta_shaped_texture_get_preferred_height; + actor_class->paint = meta_shaped_texture_paint; + actor_class->pick = meta_shaped_texture_pick; + +- x11_texture_class->update_area = meta_shaped_texture_update_area; +- + g_type_class_add_private (klass, sizeof (MetaShapedTexturePrivate)); + } + +@@ -106,6 +113,7 @@ meta_shaped_texture_init (MetaShapedText + priv->overlay_region = NULL; + priv->visible_pixels_region = NULL; + priv->paint_tower = meta_texture_tower_new (); ++ priv->texture = COGL_INVALID_HANDLE; + priv->mask_texture = COGL_INVALID_HANDLE; + priv->create_mipmaps = TRUE; + } +@@ -132,6 +140,11 @@ meta_shaped_texture_dispose (GObject *ob + cogl_handle_unref (priv->material_unshaped); + priv->material_unshaped = COGL_INVALID_HANDLE; + } ++ if (priv->texture != COGL_INVALID_HANDLE) ++ { ++ cogl_handle_unref (priv->texture); ++ priv->texture = COGL_INVALID_HANDLE; ++ } + + meta_shaped_texture_set_shape_region (self, NULL); + meta_shaped_texture_set_clip_region (self, NULL); +@@ -141,31 +154,6 @@ meta_shaped_texture_dispose (GObject *ob + } + + static void +-meta_shaped_texture_notify (GObject *object, +- GParamSpec *pspec) +-{ +- if (G_OBJECT_CLASS (meta_shaped_texture_parent_class)->notify) +- G_OBJECT_CLASS (meta_shaped_texture_parent_class)->notify (object, pspec); +- +- /* It seems like we could just do this out of update_area(), but unfortunately, +- * clutter_glx_texture_pixmap() doesn't call through the vtable on the +- * initial update_area, so we need to look for changes to the texture +- * explicitly. +- */ +- if (strcmp (pspec->name, "cogl-texture") == 0) +- { +- MetaShapedTexture *stex = (MetaShapedTexture *) object; +- MetaShapedTexturePrivate *priv = stex->priv; +- +- meta_shaped_texture_clear (stex); +- +- if (priv->create_mipmaps) +- meta_texture_tower_set_base_texture (priv->paint_tower, +- clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex))); +- } +-} +- +-static void + meta_shaped_texture_dirty_mask (MetaShapedTexture *stex) + { + MetaShapedTexturePrivate *priv = stex->priv; +@@ -310,7 +298,7 @@ meta_shaped_texture_ensure_mask (MetaSha + CoglHandle paint_tex; + guint tex_width, tex_height; + +- paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex)); ++ paint_tex = priv->texture; + + if (paint_tex == COGL_INVALID_HANDLE) + return; +@@ -451,13 +439,13 @@ meta_shaped_texture_paint (ClutterActor + if (priv->create_mipmaps) + paint_tex = meta_texture_tower_get_paint_texture (priv->paint_tower); + else +- paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex)); ++ paint_tex = priv->texture; + + if (paint_tex == COGL_INVALID_HANDLE) + return; + +- tex_width = cogl_texture_get_width (paint_tex); +- tex_height = cogl_texture_get_height (paint_tex); ++ tex_width = priv->tex_width; ++ tex_height = priv->tex_height; + + if (tex_width == 0 || tex_height == 0) /* no contents yet */ + return; +@@ -574,7 +562,7 @@ meta_shaped_texture_pick (ClutterActor + ClutterActorBox alloc; + guint tex_width, tex_height; + +- paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex)); ++ paint_tex = priv->texture; + + if (paint_tex == COGL_INVALID_HANDLE) + return; +@@ -602,19 +590,41 @@ meta_shaped_texture_pick (ClutterActor + } + + static void +-meta_shaped_texture_update_area (ClutterX11TexturePixmap *texture, +- int x, +- int y, +- int width, +- int height) ++meta_shaped_texture_get_preferred_width (ClutterActor *self, ++ gfloat for_height, ++ gfloat *min_width_p, ++ gfloat *natural_width_p) + { +- MetaShapedTexture *stex = (MetaShapedTexture *) texture; +- MetaShapedTexturePrivate *priv = stex->priv; ++ MetaShapedTexturePrivate *priv; + +- CLUTTER_X11_TEXTURE_PIXMAP_CLASS (meta_shaped_texture_parent_class)->update_area (texture, +- x, y, width, height); ++ g_return_if_fail (META_IS_SHAPED_TEXTURE (self)); + +- meta_texture_tower_update_area (priv->paint_tower, x, y, width, height); ++ priv = META_SHAPED_TEXTURE (self)->priv; ++ ++ if (min_width_p) ++ *min_width_p = 0; ++ ++ if (natural_width_p) ++ *natural_width_p = priv->tex_width; ++} ++ ++static void ++meta_shaped_texture_get_preferred_height (ClutterActor *self, ++ gfloat for_width, ++ gfloat *min_height_p, ++ gfloat *natural_height_p) ++{ ++ MetaShapedTexturePrivate *priv; ++ ++ g_return_if_fail (META_IS_SHAPED_TEXTURE (self)); ++ ++ priv = META_SHAPED_TEXTURE (self)->priv; ++ ++ if (min_height_p) ++ *min_height_p = 0; ++ ++ if (natural_height_p) ++ *natural_height_p = priv->tex_height; + } + + ClutterActor * +@@ -640,34 +650,16 @@ meta_shaped_texture_set_create_mipmaps ( + if (create_mipmaps != priv->create_mipmaps) + { + CoglHandle base_texture; +- + priv->create_mipmaps = create_mipmaps; +- + base_texture = create_mipmaps ? +- clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex)) : COGL_INVALID_HANDLE; +- ++ priv->texture : COGL_INVALID_HANDLE; + meta_texture_tower_set_base_texture (priv->paint_tower, base_texture); + } + } + +-/* This is a workaround for deficiencies in the hack tower: +- * +- * When we call clutter_x11_texture_pixmap_set_pixmap(tp, None), +- * ClutterX11TexturePixmap knows that it has to get rid of the old texture, but +- * clutter_texture_set_cogl_texture(texture, COGL_INVALID_HANDLE) isn't allowed, so +- * it grabs the material for the texture and manually sets the texture in it. This means +- * that the "cogl-texture" property isn't notified, so we don't find out about it. +- * +- * And if we keep the CoglX11TexturePixmap around after the X pixmap is freed, then +- * we'll trigger X errors when we actually try to free it. +- * +- * The only correct thing to do here is to change our code to derive +- * from ClutterActor and get rid of the inheritance hack tower. Once +- * we want to depend on Clutter-1.4 (which has CoglTexturePixmapX11), +- * that will be very easy to do. +- */ + void +-meta_shaped_texture_clear (MetaShapedTexture *stex) ++meta_shaped_texture_set_shape_region (MetaShapedTexture *stex, ++ cairo_region_t *region) + { + MetaShapedTexturePrivate *priv; + +@@ -675,38 +667,88 @@ meta_shaped_texture_clear (MetaShapedTex + + priv = stex->priv; + +- meta_texture_tower_set_base_texture (priv->paint_tower, COGL_INVALID_HANDLE); ++ if (priv->shape_region != NULL) ++ { ++ cairo_region_destroy (priv->shape_region); ++ priv->shape_region = NULL; ++ } + +- if (priv->material != COGL_INVALID_HANDLE) +- cogl_material_set_layer (priv->material, 0, COGL_INVALID_HANDLE); ++ if (region != NULL) ++ { ++ cairo_region_reference (region); ++ priv->shape_region = region; ++ } + +- if (priv->material_unshaped != COGL_INVALID_HANDLE) +- cogl_material_set_layer (priv->material_unshaped, 0, COGL_INVALID_HANDLE); ++ meta_shaped_texture_dirty_mask (stex); ++ clutter_actor_queue_redraw (CLUTTER_ACTOR (stex)); + } + + void +-meta_shaped_texture_set_shape_region (MetaShapedTexture *stex, +- cairo_region_t *region) ++meta_shaped_texture_update_area (MetaShapedTexture *stex, ++ int x, ++ int y, ++ int width, ++ int height) + { + MetaShapedTexturePrivate *priv; ++ const cairo_rectangle_int_t clip = { x, y, width, height }; ++ ++ priv = stex->priv; ++ ++ if (priv->texture == COGL_INVALID_HANDLE) ++ return; ++ ++ cogl_texture_pixmap_x11_update_area (priv->texture, x, y, width, height); ++ ++ meta_texture_tower_update_area (priv->paint_tower, x, y, width, height); ++ ++ clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &clip); ++} ++ ++static void ++set_cogl_texture (MetaShapedTexture *stex, ++ CoglHandle cogl_tex) ++{ ++ MetaShapedTexturePrivate *priv; ++ guint width, height; + + g_return_if_fail (META_IS_SHAPED_TEXTURE (stex)); + + priv = stex->priv; + +- if (priv->shape_region != NULL) ++ if (priv->texture != COGL_INVALID_HANDLE) ++ cogl_handle_unref (priv->texture); ++ ++ priv->texture = cogl_tex; ++ ++ if (priv->material != COGL_INVALID_HANDLE) ++ cogl_material_set_layer (priv->material, 0, cogl_tex); ++ ++ if (priv->material_unshaped != COGL_INVALID_HANDLE) ++ cogl_material_set_layer (priv->material_unshaped, 0, cogl_tex); ++ ++ if (cogl_tex != COGL_INVALID_HANDLE) + { +- cairo_region_destroy (priv->shape_region); +- priv->shape_region = NULL; +- } ++ width = cogl_texture_get_width (cogl_tex); ++ height = cogl_texture_get_height (cogl_tex); + +- if (region != NULL) ++ if (width != priv->tex_width || ++ height != priv->tex_height) ++ { ++ priv->tex_width = width; ++ priv->tex_height = height; ++ ++ clutter_actor_queue_relayout (CLUTTER_ACTOR (stex)); ++ } ++ } ++ else + { +- cairo_region_reference (region); +- priv->shape_region = region; ++ /* size changed to 0 going to an invalid handle */ ++ priv->tex_width = 0; ++ priv->tex_height = 0; ++ clutter_actor_queue_relayout (CLUTTER_ACTOR (stex)); + } + +- meta_shaped_texture_dirty_mask (stex); + clutter_actor_queue_redraw (CLUTTER_ACTOR (stex)); + } + +@@ -729,12 +771,58 @@ meta_shaped_texture_get_visible_pixels_r + } + <<Diff was trimmed, longer than 597 lines>> _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
