[mutter-mbl] Fix FTBFS 715855

Peter Robinson pbrobinson at fedoraproject.org
Thu Oct 13 13:16:45 UTC 2011


commit 45f12fc053f700d2a5748db306433af41450d0b6
Author: Peter Robinson <pbrobinson at gmail.com>
Date:   Thu Oct 13 14:16:32 2011 +0100

    Fix FTBFS 715855

 .gitignore           |    4 +-
 mutter-mbl.spec      |   23 ++-
 mutter-notused.patch |  522 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 537 insertions(+), 12 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 6cefd63..a9d15c2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1 @@
-mutter-2.29.1_1.0.tar.bz2
-/mutter-2.31.5_1.0.tar.bz2
-/mutter-2.31.5_1.1.tar.bz2
+/mutter-2.31.*.tar.bz2
diff --git a/mutter-mbl.spec b/mutter-mbl.spec
index aa1dd0b..adc950c 100644
--- a/mutter-mbl.spec
+++ b/mutter-mbl.spec
@@ -5,13 +5,14 @@
 
 Name:          mutter-mbl
 Version:       2.31.5_1.1
-Release:       3%{?dist}
+Release:       4%{?dist}
 Summary:       Window and compositing manager based on Clutter
 
 Group:         User Interface/Desktops
 License:       GPLv2+
 URL:           http://www.meego.com/
 Source0:       %{tarfile}
+Patch0:        mutter-notused.patch
 
 BuildRequires: clutter-devel
 BuildRequires: pango-devel
@@ -66,6 +67,7 @@ utilities for testing Metacity/Mutter themes.
 
 %prep
 %setup -q -n mutter-%{version}
+%patch0 -p1 -b .notused
 
 # Remove exec perms from source files
 chmod -x src/compositor/*.c
@@ -155,32 +157,35 @@ gconftool-2 --makefile-install-rule \
 %doc %{_mandir}/man1/mutter-window-demo.1.gz
 
 %changelog
+* Thu Oct 13 2011 Peter Robinson <pbrobinson at fedoraproject.org> - 2.31.5_1.1-4
+- Fix FTBFS 715855
+
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.31.5_1.1-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
-* Mon Dec  6 2010 Peter Robinson <pbrobinson at gmail.com> 2.31.5_1.1-2
+* Mon Dec  6 2010 Peter Robinson <pbrobinson at fedoraproject.org> 2.31.5_1.1-2
 - Build against gtk3
 
-* Sun Dec  5 2010 Peter Robinson <pbrobinson at gmail.com> 2.31.5_1.1-1
+* Sun Dec  5 2010 Peter Robinson <pbrobinson at fedoraproject.org> 2.31.5_1.1-1
 - Update to 2.31.5_1.1 release
 
-* Wed Sep  1 2010 Peter Robinson <pbrobinson at gmail.com> 2.31.5_1.0-1
+* Wed Sep  1 2010 Peter Robinson <pbrobinson at fedoraproject.org> 2.31.5_1.0-1
 - Update to 2.31.5_1.0 release
 
-* Wed Jul 14 2010 Peter Robinson <pbrobinson at gmail.com> 2.29.1_1.0-1
+* Wed Jul 14 2010 Peter Robinson <pbrobinson at fedoraproject.org> 2.29.1_1.0-1
 - Update to 2.29.1_1.0 release
 
 * Mon Jul 12 2010 Colin Walters <walters at pocket> - 2.29.1_0.5-2
 - Rebuild for new gobject-introspection
 
-* Sun Jul 11 2010 Peter Robinson <pbrobinson at gmail.com> 2.29.1_0.5-1
+* Sun Jul 11 2010 Peter Robinson <pbrobinson at fedoraproject.org> 2.29.1_0.5-1
 - Update to 2.29.1_0.5 release
 
-* Fri Jun 25 2010 Peter Robinson <pbrobinson at gmail.com> 2.29.1_0.4-1
+* Fri Jun 25 2010 Peter Robinson <pbrobinson at fedoraproject.org> 2.29.1_0.4-1
 - Update to 2.29.1_0.4 release
 
-* Thu Mar 25 2010 Peter Robinson <pbrobinson at gmail.com> 2.28.1_0.12-1
+* Thu Mar 25 2010 Peter Robinson <pbrobinson at fedoraproject.org> 2.28.1_0.12-1
 - Update to 2.28.1_0.12 release
 
-* Thu Mar 25 2010 Peter Robinson <pbrobinson at gmail.com> 2.28.1_0.0-1
+* Thu Mar 25 2010 Peter Robinson <pbrobinson at fedoraproject.org> 2.28.1_0.0-1
 - Initial spec based on mutter
diff --git a/mutter-notused.patch b/mutter-notused.patch
new file mode 100644
index 0000000..10f64a2
--- /dev/null
+++ b/mutter-notused.patch
@@ -0,0 +1,522 @@
+--- mutter-2.31.5_1.1/src/compositor/plugins/default.c.orig	2011-10-13 12:55:52.204343071 +0100
++++ mutter-2.31.5_1.1/src/compositor/plugins/default.c	2011-10-13 12:56:40.887345639 +0100
+@@ -311,12 +311,10 @@
+ {
+   MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
+   GList        *l;
+-  gint          n_workspaces;
+   ClutterActor *workspace0  = clutter_group_new ();
+   ClutterActor *workspace1  = clutter_group_new ();
+   ClutterActor *stage;
+   int           screen_width, screen_height;
+-  MetaScreen   *screen = mutter_plugin_get_screen (plugin);
+   ClutterAnimation *animation;
+ 
+   stage = mutter_plugin_get_stage (plugin);
+@@ -342,8 +340,6 @@
+       return;
+     }
+ 
+-  n_workspaces = meta_screen_get_n_workspaces (screen);
+-
+   l = g_list_last (mutter_plugin_get_windows (plugin));
+ 
+   while (l)
+--- mutter-2.31.5_1.1/src/core/boxes.c.orig	2011-10-13 13:03:41.697304067 +0100
++++ mutter-2.31.5_1.1/src/core/boxes.c	2011-10-13 13:04:00.893308869 +0100
+@@ -340,7 +340,6 @@
+    */
+ 
+   /* First, the x direction */
+-  int adjust = 0;
+   switch (gravity)
+     {
+     case NorthWestGravity:
+@@ -373,7 +372,6 @@
+   rect->width = new_width;
+   
+   /* Next, the y direction */
+-  adjust = 0;
+   switch (gravity)
+     {
+     case NorthWestGravity:
+--- mutter-2.31.5_1.1/src/compositor/mutter-window.c.orig	2011-10-13 13:05:52.868304969 +0100
++++ mutter-2.31.5_1.1/src/compositor/mutter-window.c	2011-10-13 13:07:26.287329509 +0100
+@@ -265,7 +265,6 @@
+   MetaDisplay         *display  = meta_screen_get_display (screen);
+   Display             *xdisplay = meta_display_get_xdisplay (display);
+   Window               new_xwindow;
+-  MetaCompScreen      *info;
+   XWindowAttributes    attrs;
+ 
+   /*
+@@ -281,8 +280,6 @@
+ 
+   mutter_window_detach (self);
+ 
+-  info = meta_screen_get_compositor_data (screen);
+-
+   /*
+    * First of all, clean up any resources we are currently using and will
+    * be replacing.
+@@ -1620,7 +1617,6 @@
+   MetaCompScreen      *info     = meta_screen_get_compositor_data (screen);
+   MetaCompositor      *compositor;
+   Window               xwindow  = priv->xwindow;
+-  gboolean             full     = FALSE;
+ 
+   if (!priv->needs_pixmap)
+     return;
+@@ -1698,8 +1694,6 @@
+                                 priv->shadow->attach_top);
+ 
+       mutter_window_update_bounding_region (self, pxm_width, pxm_height);
+-
+-      full = TRUE;
+     }
+ 
+   meta_error_trap_pop (display, FALSE);
+--- mutter-2.31.5_1.1/src/core/errors.c.orig	2011-10-13 13:08:48.854302301 +0100
++++ mutter-2.31.5_1.1/src/core/errors.c	2011-10-13 13:09:35.937284085 +0100
+@@ -96,11 +96,6 @@
+        * assumes that there are no pending GDK traps from GDK itself
+        */
+       
+-      int (* restored_error_handler) (Display     *,
+-                                      XErrorEvent *);
+-
+-      restored_error_handler = XSetErrorHandler (x_error_handler);
+-
+       /* remove this */
+       display->error_trap_handler = NULL;
+     }
+--- mutter-2.31.5_1.1/src/core/main.c.orig	2011-10-13 13:10:33.142294262 +0100
++++ mutter-2.31.5_1.1/src/core/main.c	2011-10-13 13:10:55.058295145 +0100
+@@ -462,9 +462,6 @@
+ {
+   if (sigterm_pipe_fds[1] >= 0)
+     {
+-      int dummy;
+-
+-      dummy = write (sigterm_pipe_fds[1], "", 1);
+       close (sigterm_pipe_fds[1]);
+       sigterm_pipe_fds[1] = -1;
+     }
+--- mutter-2.31.5_1.1/src/core/screen.c.orig	2011-10-13 13:11:54.279287055 +0100
++++ mutter-2.31.5_1.1/src/core/screen.c	2011-10-13 13:13:36.965299641 +0100
+@@ -928,7 +928,6 @@
+ meta_screen_manage_all_windows (MetaScreen *screen)
+ {
+   GList *windows;
+-  GList *list;
+ 
+   meta_display_grab (screen->display);
+ 
+@@ -939,15 +938,6 @@
+   windows = list_windows (screen);
+ 
+   meta_stack_freeze (screen->stack);
+-  for (list = windows; list != NULL; list = list->next)
+-    {
+-      WindowInfo *info = list->data;
+-      MetaWindow *window;
+-
+-      window = meta_window_new_with_attrs (screen->display, info->xwindow, TRUE,
+-                                           META_COMP_EFFECT_NONE,
+-                                           &info->attrs);
+-    }
+   meta_stack_thaw (screen->stack);
+ 
+   g_list_foreach (windows, (GFunc)g_free, NULL);
+--- mutter-2.31.5_1.1/src/core/window.c.orig	2011-10-13 13:14:43.082279868 +0100
++++ mutter-2.31.5_1.1/src/core/window.c	2011-10-13 13:18:15.689269701 +0100
+@@ -5790,19 +5790,13 @@
+   else if (event->xclient.message_type ==
+            display->atom__NET_MOVERESIZE_WINDOW)
+     {
+-      int gravity, source;
+       guint value_mask;
+ 
+-      gravity = (event->xclient.data.l[0] & 0xff);
+       value_mask = (event->xclient.data.l[0] & 0xf00) >> 8;
+-      source = (event->xclient.data.l[0] & 0xf000) >> 12;
+-
+-      if (gravity == 0)
+-        gravity = window->size_hints.win_gravity;
+ 
+       meta_window_move_resize_request(window,
+                                       value_mask,
+-                                      gravity,
++                                      0,
+                                       event->xclient.data.l[1],  /* x */
+                                       event->xclient.data.l[2],  /* y */
+                                       event->xclient.data.l[3],  /* width */
+@@ -5838,7 +5832,6 @@
+   else if (event->xclient.message_type ==
+            display->atom__NET_WM_FULLSCREEN_MONITORS)
+     {
+-      MetaClientType source_indication;
+       gulong top, bottom, left, right;
+ 
+       meta_verbose ("_NET_WM_FULLSCREEN_MONITORS request for window '%s'\n",
+@@ -5848,7 +5841,6 @@
+       bottom = event->xclient.data.l[1];
+       left = event->xclient.data.l[2];
+       right = event->xclient.data.l[3];
+-      source_indication = event->xclient.data.l[4];
+ 
+       meta_window_update_fullscreen_monitors (window, top, bottom, left, right);
+     }
+@@ -7434,7 +7426,6 @@
+ {
+   MetaRectangle  titlebar_rect;
+   GList         *onscreen_region;
+-  int            titlebar_size;
+   gboolean       is_onscreen;
+ 
+   const int min_height_needed  = 8;
+@@ -7448,7 +7439,6 @@
+   /* Get the rectangle corresponding to the titlebar */
+   meta_window_get_outer_rect (window, &titlebar_rect);
+   titlebar_rect.height = window->frame->child_y;
+-  titlebar_size = meta_rectangle_area (&titlebar_rect);
+ 
+   /* Run through the spanning rectangles for the screen and see if one of
+    * them overlaps with the titlebar sufficiently to consider it onscreen.
+--- mutter-2.31.5_1.1/src/ui/themewidget.c.orig	2011-10-13 13:19:39.070228008 +0100
++++ mutter-2.31.5_1.1/src/ui/themewidget.c	2011-10-13 13:20:14.330264063 +0100
+@@ -39,10 +39,8 @@
+ meta_area_class_init (MetaAreaClass *class)
+ {
+   GObjectClass *gobject_class = G_OBJECT_CLASS (class);
+-  GtkObjectClass *object_class;
+   GtkWidgetClass *widget_class;
+ 
+-  object_class = (GtkObjectClass*) class;
+   widget_class = (GtkWidgetClass*) class;
+ 
+   gobject_class->finalize = meta_area_finalize;
+--- mutter-2.31.5_1.1/src/ui/testgradient.c.orig	2011-10-13 13:20:40.832254393 +0100
++++ mutter-2.31.5_1.1/src/ui/testgradient.c	2011-10-13 13:25:35.406227503 +0100
+@@ -29,296 +29,8 @@
+                                      int          height);
+ 
+ static void
+-draw_checkerboard (GdkDrawable *drawable,
+-                   int          width,
+-                   int          height)
+-{
+-  gint i, j, xcount, ycount;
+-  GdkColor color1, color2;
+-  cairo_t *cr;
+-  
+-#define CHECK_SIZE 10
+-#define SPACING 2  
+-
+-  color1.red = 30000;
+-  color1.green = 30000;
+-  color1.blue = 30000;
+-
+-  color2.red = 50000;
+-  color2.green = 50000;
+-  color2.blue = 50000;
+-
+-  cr = gdk_cairo_create (drawable);
+-
+-  xcount = 0;
+-  i = SPACING;
+-  while (i < width)
+-    {
+-      j = SPACING;
+-      ycount = xcount % 2; /* start with even/odd depending on row */
+-      while (j < height)
+-	{
+-	  if (ycount % 2)
+-	    gdk_cairo_set_source_color (cr, &color1);
+-	  else
+-	    gdk_cairo_set_source_color (cr, &color2);
+-
+-	  /* If we're outside event->area, this will do nothing.
+-	   * It might be mildly more efficient if we handled
+-	   * the clipping ourselves, but again we're feeling lazy.
+-	   */
+-          cairo_rectangle (cr, i, j, CHECK_SIZE, CHECK_SIZE);
+-          cairo_fill (cr);
+-
+-	  j += CHECK_SIZE + SPACING;
+-	  ++ycount;
+-	}
+-
+-      i += CHECK_SIZE + SPACING;
+-      ++xcount;
+-    }
+-  
+-  cairo_destroy (cr);
+-}
+-
+-static void
+-render_simple (GdkDrawable *drawable,
+-               cairo_t     *cr,
+-               int width, int height,
+-               MetaGradientType type,
+-               gboolean    with_alpha)
+-{
+-  GdkPixbuf *pixbuf;
+-  GdkColor from, to;
+-  
+-  gdk_color_parse ("blue", &from);
+-  gdk_color_parse ("green", &to);
+-
+-  pixbuf = meta_gradient_create_simple (width, height,
+-                                        &from, &to,
+-                                        type);
+-
+-  if (with_alpha)
+-    {
+-      const unsigned char alphas[] = { 0xff, 0xaa, 0x2f, 0x0, 0xcc, 0xff, 0xff };
+-      
+-      if (!gdk_pixbuf_get_has_alpha (pixbuf))
+-        {
+-          GdkPixbuf *new_pixbuf;
+-          
+-          new_pixbuf = gdk_pixbuf_add_alpha (pixbuf, FALSE, 0, 0, 0);
+-          g_object_unref (G_OBJECT (pixbuf));
+-          pixbuf = new_pixbuf;
+-        }
+-      
+-      meta_gradient_add_alpha (pixbuf,
+-                               alphas, G_N_ELEMENTS (alphas),
+-                               META_GRADIENT_HORIZONTAL);
+-      
+-      draw_checkerboard (drawable, width, height);
+-    }
+-    
+-  gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
+-  cairo_rectangle (cr, 0, 0, width, height);
+-  cairo_fill (cr);
+-
+-  g_object_unref (G_OBJECT (pixbuf));
+-}
+-
+-static void
+-render_vertical_func (GdkDrawable *drawable,
+-                      cairo_t *cr,
+-                      int width, int height)
+-{
+-  render_simple (drawable, cr, width, height, META_GRADIENT_VERTICAL, FALSE);
+-}
+-
+-static void
+-render_horizontal_func (GdkDrawable *drawable,
+-                        cairo_t *cr,
+-                        int width, int height)
+-{
+-  render_simple (drawable, cr, width, height, META_GRADIENT_HORIZONTAL, FALSE);
+-}
+-
+-static void
+-render_diagonal_func (GdkDrawable *drawable,
+-                      cairo_t *cr,
+-                      int width, int height)
+-{
+-  render_simple (drawable, cr, width, height, META_GRADIENT_DIAGONAL, FALSE);
+-}
+-
+-static void
+-render_diagonal_alpha_func (GdkDrawable *drawable,
+-                            cairo_t *cr,
+-                            int width, int height)
+-{
+-  render_simple (drawable, cr, width, height, META_GRADIENT_DIAGONAL, TRUE);
+-}
+-
+-static void
+-render_multi (GdkDrawable *drawable,
+-              cairo_t     *cr,
+-              int width, int height,
+-              MetaGradientType type)
+-{
+-  GdkPixbuf *pixbuf;
+-#define N_COLORS 5
+-  GdkColor colors[N_COLORS];
+-
+-  gdk_color_parse ("red", &colors[0]);
+-  gdk_color_parse ("blue", &colors[1]);
+-  gdk_color_parse ("orange", &colors[2]);
+-  gdk_color_parse ("pink", &colors[3]);
+-  gdk_color_parse ("green", &colors[4]);
+-
+-  pixbuf = meta_gradient_create_multi (width, height,
+-                                       colors, N_COLORS,
+-                                       type);
+-
+-  gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
+-  cairo_rectangle (cr, 0, 0, width, height);
+-  cairo_fill (cr);
+-
+-  g_object_unref (G_OBJECT (pixbuf));
+-#undef N_COLORS
+-}
+-
+-static void
+-render_vertical_multi_func (GdkDrawable *drawable,
+-                            cairo_t *cr,
+-                            int width, int height)
+-{
+-  render_multi (drawable, cr, width, height, META_GRADIENT_VERTICAL);
+-}
+-
+-static void
+-render_horizontal_multi_func (GdkDrawable *drawable,
+-                              cairo_t *cr,
+-                              int width, int height)
+-{
+-  render_multi (drawable, cr, width, height, META_GRADIENT_HORIZONTAL);
+-}
+-
+-static void
+-render_diagonal_multi_func (GdkDrawable *drawable,
+-                            cairo_t *cr,
+-                            int width, int height)
+-{
+-  render_multi (drawable, cr, width, height, META_GRADIENT_DIAGONAL);
+-}
+-
+-static void
+-render_interwoven_func (GdkDrawable *drawable,
+-                        cairo_t     *cr,
+-                        int width, int height)
+-{
+-  GdkPixbuf *pixbuf;
+-#define N_COLORS 4
+-  GdkColor colors[N_COLORS];
+-
+-  gdk_color_parse ("red", &colors[0]);
+-  gdk_color_parse ("blue", &colors[1]);
+-  gdk_color_parse ("pink", &colors[2]);
+-  gdk_color_parse ("green", &colors[3]);
+-
+-  pixbuf = meta_gradient_create_interwoven (width, height,
+-                                            colors, height / 10,
+-                                            colors + 2, height / 14);
+-
+-  gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
+-  cairo_rectangle (cr, 0, 0, width, height);
+-  cairo_fill (cr);
+-
+-  g_object_unref (G_OBJECT (pixbuf));
+-}
+-
+-static gboolean
+-expose_callback (GtkWidget *widget,
+-                 GdkEventExpose *event,
+-                 gpointer data)
+-{
+-  RenderGradientFunc func = data;
+-  GdkWindow *window;
+-  GtkAllocation allocation;
+-  GtkStyle *style;
+-  cairo_t *cr;
+-
+-  style = gtk_widget_get_style (widget);
+-  gtk_widget_get_allocation (widget, &allocation);
+-
+-  window = gtk_widget_get_window (widget);
+-  cr = gdk_cairo_create (window);
+-  gdk_cairo_set_source_color (cr, &style->fg[gtk_widget_get_state (widget)]);
+-
+-  (* func) (gtk_widget_get_window (widget),
+-            cr,
+-            allocation.width,
+-            allocation.height);
+-
+-  cairo_destroy (cr);
+-
+-  return TRUE;
+-}
+-
+-static GtkWidget*
+-create_gradient_window (const char *title,
+-                        RenderGradientFunc func)
+-{
+-  GtkWidget *window;
+-  GtkWidget *drawing_area;
+-
+-  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+-
+-  gtk_window_set_title (GTK_WINDOW (window), title);
+-  
+-  drawing_area = gtk_drawing_area_new ();
+-
+-  gtk_widget_set_size_request (drawing_area, 1, 1);
+-
+-  gtk_window_set_default_size (GTK_WINDOW (window), 175, 175);
+-  
+-  g_signal_connect (G_OBJECT (drawing_area),
+-                    "expose_event",
+-                    G_CALLBACK (expose_callback),
+-                    func);
+-
+-  gtk_container_add (GTK_CONTAINER (window), drawing_area);
+-
+-  gtk_widget_show_all (window);
+-  
+-  return window;
+-}
+-
+-static void
+ meta_gradient_test (void)
+ {
+-  GtkWidget *window;
+-
+-  window = create_gradient_window ("Simple vertical",
+-                                   render_vertical_func);
+-  
+-  window = create_gradient_window ("Simple horizontal",
+-                                   render_horizontal_func);
+-
+-  window = create_gradient_window ("Simple diagonal",
+-                                   render_diagonal_func);
+-
+-  window = create_gradient_window ("Multi vertical",
+-                                   render_vertical_multi_func);
+-  
+-  window = create_gradient_window ("Multi horizontal",
+-                                   render_horizontal_multi_func);
+-
+-  window = create_gradient_window ("Multi diagonal",
+-                                   render_diagonal_multi_func);
+-
+-  window = create_gradient_window ("Interwoven",
+-                                   render_interwoven_func);
+-
+-  window = create_gradient_window ("Simple diagonal with horizontal multi alpha",
+-                                   render_diagonal_alpha_func);
+ 
+ }
+ 
+--- mutter-2.31.5_1.1/src/core/testasyncgetprop.c.orig	2011-10-13 13:27:17.156245273 +0100
++++ mutter-2.31.5_1.1/src/core/testasyncgetprop.c	2011-10-13 13:28:23.759241436 +0100
+@@ -416,22 +416,11 @@
+       
+       while ((task = ag_get_next_completed_task (xdisplay)))
+         {
+-          int result;
+-          Atom actual_type;
+-          int actual_format;
+-          unsigned long n_items;
+-          unsigned long bytes_after;
+           unsigned char *data;
+ 
+           assert (ag_task_have_reply (task));
+           
+           data = NULL;
+-          result = ag_task_get_reply_and_free (task,
+-                                               &actual_type,
+-                                               &actual_format,
+-                                               &n_items,
+-                                               &bytes_after,
+-                                               &data);
+           
+           if (data)
+             XFree (data);


More information about the scm-commits mailing list