From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from <gentoo-commits+bounces-366074-garchives=archives.gentoo.org@lists.gentoo.org>) id 1Qlx2Z-0002Ez-U0 for garchives@archives.gentoo.org; Wed, 27 Jul 2011 05:52:21 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9495F21C0C3; Wed, 27 Jul 2011 05:51:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2061B21C0C3 for <gentoo-commits@lists.gentoo.org>; Wed, 27 Jul 2011 05:51:55 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 574211B4023 for <gentoo-commits@lists.gentoo.org>; Wed, 27 Jul 2011 05:51:55 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id BF2A28003D for <gentoo-commits@lists.gentoo.org>; Wed, 27 Jul 2011 05:51:54 +0000 (UTC) From: "Alexandre Restovtsev" <tetromino@gmail.com> To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexandre Restovtsev" <tetromino@gmail.com> Message-ID: <e6959005a459411ddd87db42af3fd45f26e6da71.tetromino@gentoo> Subject: [gentoo-commits] proj/gnome:gnome-next commit in: x11-wm/mutter/, x11-wm/mutter/files/ X-VCS-Repository: proj/gnome X-VCS-Files: x11-wm/mutter/files/mutter-3.0.2-argb-windows-shadow.patch x11-wm/mutter/files/mutter-3.0.2-fix-xshape.patch x11-wm/mutter/files/mutter-3.0.2-frame-region-cairo-region.patch x11-wm/mutter/files/mutter-3.1.3.1-crash-on-exit.patch x11-wm/mutter/files/mutter-3.1.3.1-meta_later-reentrant.patch x11-wm/mutter/mutter-3.0.2.1.ebuild x11-wm/mutter/mutter-3.1.3.1.ebuild x11-wm/mutter/mutter-9999.ebuild X-VCS-Directories: x11-wm/mutter/ x11-wm/mutter/files/ X-VCS-Committer: tetromino X-VCS-Committer-Name: Alexandre Restovtsev X-VCS-Revision: e6959005a459411ddd87db42af3fd45f26e6da71 Date: Wed, 27 Jul 2011 05:51:54 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 89064be22850fb15132af41dde160a1c commit: e6959005a459411ddd87db42af3fd45f26e6da71 Author: Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com> AuthorDate: Wed Jul 27 03:02:54 2011 +0000 Commit: Alexandre Restovtsev <tetromino <AT> gmail <DOT> com> CommitDate: Wed Jul 27 03:02:54 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gnome.git;a=3D= commit;h=3De6959005 x11-wm/mutter: 3.0.2.1 =E2=86=92 3.1.3.1 Bump to gnome-3.1.x version. Update live version's dependencies. Add a couple of patches from upstream git to fix crashes. Transparency patches were applied upstream. --- .../files/mutter-3.0.2-argb-windows-shadow.patch | 764 --------------= ------ x11-wm/mutter/files/mutter-3.0.2-fix-xshape.patch | 30 - .../mutter-3.0.2-frame-region-cairo-region.patch | 234 ------ .../files/mutter-3.1.3.1-crash-on-exit.patch | 37 + .../mutter-3.1.3.1-meta_later-reentrant.patch | 141 ++++ ...mutter-3.0.2.1.ebuild =3D> mutter-3.1.3.1.ebuild} | 11 +- x11-wm/mutter/mutter-9999.ebuild | 4 +- 7 files changed, 184 insertions(+), 1037 deletions(-) diff --git a/x11-wm/mutter/files/mutter-3.0.2-argb-windows-shadow.patch b= /x11-wm/mutter/files/mutter-3.0.2-argb-windows-shadow.patch deleted file mode 100644 index 2ae376d..0000000 --- a/x11-wm/mutter/files/mutter-3.0.2-argb-windows-shadow.patch +++ /dev/null @@ -1,764 +0,0 @@ -From 67c3c93b8fd1e11716e72142ca43deb978e15c98 Mon Sep 17 00:00:00 2001 -From: Owen W. Taylor <otaylor@fishsoup.net> -Date: Tue, 22 Mar 2011 19:36:12 +0000 -Subject: Only shadow ARGB windows with a frame outside the frame - -An ARGB window with a frame is likely something like a transparent -terminal. It looks awful (and breaks transparency) to draw a big -opaque black shadow under the window, so clip out the region under -the terminal from the shadow we draw. - -Add meta_window_get_frame_bounds() to get a cairo region for the -outer bounds of the frame of a window, and modify the frame handling -code to notice changes to the frame shape and discard a cached -region. meta_frames_apply_shapes() is refactored so we can extract -meta_frames_get_frame_bounds() from it. - -https://bugzilla.gnome.org/show_bug.cgi?id=3D635268 ---- -diff --git a/src/compositor/meta-shadow-factory-private.h b/src/composit= or/meta-shadow-factory-private.h -index 3d51cbb..e6b033e 100644 ---- a/src/compositor/meta-shadow-factory-private.h -+++ b/src/compositor/meta-shadow-factory-private.h -@@ -47,7 +47,8 @@ void meta_shadow_paint (MetaShadow = *shadow, - int window_widt= h, - int window_heig= ht, - guint8 opacity, -- cairo_region_t *clip); -+ cairo_region_t *clip, -+ gboolean clip_strict= ly); - void meta_shadow_get_bounds (MetaShadow *shadow, - int window_x, - int window_y, -diff --git a/src/compositor/meta-shadow-factory.c b/src/compositor/meta-= shadow-factory.c -index 1a9a447..f8bb1a8 100644 ---- a/src/compositor/meta-shadow-factory.c -+++ b/src/compositor/meta-shadow-factory.c -@@ -189,8 +189,10 @@ meta_shadow_unref (MetaShadow *shadow) - * @window_width: actual width of the region to paint a shadow for - * @window_height: actual height of the region to paint a shadow for - * @clip: (allow-none): if non-%NULL specifies the visible portion -- * of the shadow. Drawing won't be strictly clipped to this region -- * but it will be used to optimize what is drawn. -+ * of the shadow. -+ * @clip_strictly: if %TRUE, drawing will be clipped strictly -+ * to @clip, otherwise, it will be only used to optimize -+ * drawing. - * - * Paints the shadow at the given position, for the specified actual - * size of the region. (Since a #MetaShadow can be shared between -@@ -204,7 +206,8 @@ meta_shadow_paint (MetaShadow *shadow, - int window_width, - int window_height, - guint8 opacity, -- cairo_region_t *clip) -+ cairo_region_t *clip, -+ gboolean clip_strictly) - { - float texture_width =3D cogl_texture_get_width (shadow->texture); - float texture_height =3D cogl_texture_get_height (shadow->texture); -@@ -276,6 +279,9 @@ meta_shadow_paint (MetaShadow *shadow, - dest_rect.y =3D dest_y[j]; - dest_rect.height =3D dest_y[j + 1] - dest_y[j]; -=20 -+ if (dest_rect.height =3D=3D 0) -+ continue; -+ - for (i =3D 0; i < n_x; i++) - { - cairo_region_overlap_t overlap; -@@ -283,16 +289,64 @@ meta_shadow_paint (MetaShadow *shadow, - dest_rect.x =3D dest_x[i]; - dest_rect.width =3D dest_x[i + 1] - dest_x[i]; -=20 -+ if (dest_rect.width =3D=3D 0) -+ continue; -+ - if (clip) - overlap =3D cairo_region_contains_rectangle (clip, &dest_re= ct); - else -- overlap =3D CAIRO_REGION_OVERLAP_PART; -+ overlap =3D CAIRO_REGION_OVERLAP_IN; -=20 -- if (overlap !=3D CAIRO_REGION_OVERLAP_OUT) -- cogl_rectangle_with_texture_coords (dest_x[i], dest_y[j], -- dest_x[i + 1], dest_y[j= + 1], -- src_x[i], src_y[j], -- src_x[i + 1], src_y[j += 1]); -+ /* There's quite a bit of overhead from allocating a new -+ * region in order to find an exact intersection and -+ * generating more geometry - we make the assumption that -+ * unless we have to clip strictly it will be cheaper to -+ * just draw the entire rectangle. -+ */ -+ if (overlap =3D=3D CAIRO_REGION_OVERLAP_IN || -+ (overlap =3D=3D CAIRO_REGION_OVERLAP_PART && !clip_strict= ly)) -+ { -+ cogl_rectangle_with_texture_coords (dest_x[i], dest_y[j], -+ dest_x[i + 1], dest_y= [j + 1], -+ src_x[i], src_y[j], -+ src_x[i + 1], src_y[j= + 1]); -+ } -+ else if (overlap =3D=3D CAIRO_REGION_OVERLAP_PART) -+ { -+ cairo_region_t *intersection; -+ int n_rectangles, k; -+ -+ intersection =3D cairo_region_create_rectangle (&dest_rec= t); -+ cairo_region_intersect (intersection, clip); -+ -+ n_rectangles =3D cairo_region_num_rectangles (intersectio= n); -+ for (k =3D 0; k < n_rectangles; k++) -+ { -+ cairo_rectangle_int_t rect; -+ float src_x1, src_x2, src_y1, src_y2; -+ -+ cairo_region_get_rectangle (intersection, k, &rect); -+ -+ /* Separately linear interpolate X and Y coordinates = in the source -+ * based on the destination X and Y coordinates */ -+ -+ src_x1 =3D (src_x[i] * (dest_rect.x + dest_rect.width= - rect.x) + -+ src_x[i + 1] * (rect.x - dest_rect.x)) / de= st_rect.width; -+ src_x2 =3D (src_x[i] * (dest_rect.x + dest_rect.width= - (rect.x + rect.width)) + -+ src_x[i + 1] * (rect.x + rect.width - dest_= rect.x)) / dest_rect.width; -+ -+ src_y1 =3D (src_y[j] * (dest_rect.y + dest_rect.heigh= t - rect.y) + -+ src_y[j + 1] * (rect.y - dest_rect.y)) / de= st_rect.height; -+ src_y2 =3D (src_y[j] * (dest_rect.y + dest_rect.heigh= t - (rect.y + rect.height)) + -+ src_y[j + 1] * (rect.y + rect.height - dest= _rect.y)) / dest_rect.height; -+ -+ cogl_rectangle_with_texture_coords (rect.x, rect.y, -+ rect.x + rect.wid= th, rect.y + rect.height, -+ src_x1, src_y1, s= rc_x2, src_y2); -+ } -+ -+ cairo_region_destroy (intersection); -+ } - } - } - } -diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-wi= ndow-actor.c -index 3be0363..4aab5c9 100644 ---- a/src/compositor/meta-window-actor.c -+++ b/src/compositor/meta-window-actor.c -@@ -702,6 +702,26 @@ meta_window_actor_get_shadow_bounds (MetaWindowActo= r *self, - } - #endif -=20 -+/* If we have an ARGB32 window that we decorate with a frame, it's -+ * probably something like a translucent terminal - something where -+ * the alpha channel represents transparency rather than a shape. We -+ * don't want to show the shadow through the translucent areas since -+ * the shadow is wrong for translucent windows (it should be -+ * translucent itself and colored), and not only that, will /look/ -+ * horribly wrong - a misplaced big black blob. As a hack, what we -+ * want to do is just draw the shadow as normal outside the frame, and -+ * inside the frame draw no shadow. This is also not even close to -+ * the right result, but looks OK. We also apply this approach to -+ * windows set to be partially translucent with _NET_WM_WINDOW_OPACITY. -+ */ -+static gboolean -+clip_shadow_under_window (MetaWindowActor *self) -+{ -+ MetaWindowActorPrivate *priv =3D self->priv; -+ -+ return (priv->argb32 || priv->opacity !=3D 0xff) && priv->window->fra= me; -+} -+ - static void - meta_window_actor_paint (ClutterActor *actor) - { -@@ -714,17 +734,36 @@ meta_window_actor_paint (ClutterActor *actor) - { - MetaShadowParams params; - cairo_rectangle_int_t shape_bounds; -+ cairo_region_t *clip =3D priv->shadow_clip; -=20 - meta_window_actor_get_shape_bounds (self, &shape_bounds); - meta_window_actor_get_shadow_params (self, appears_focused, ¶= ms); -=20 -+ /* The frame bounds are already subtracted from priv->shadow_clip -+ * if that exists. -+ */ -+ if (!clip && clip_shadow_under_window (self)) -+ { -+ cairo_region_t *frame_bounds =3D meta_window_get_frame_bounds= (priv->window); -+ cairo_rectangle_int_t bounds; -+ -+ meta_window_actor_get_shadow_bounds (self, appears_focused, &= bounds); -+ clip =3D cairo_region_create_rectangle (&bounds); -+ -+ cairo_region_subtract (clip, frame_bounds); -+ } -+ - meta_shadow_paint (shadow, - params.x_offset + shape_bounds.x, - params.y_offset + shape_bounds.y, - shape_bounds.width, - shape_bounds.height, - (clutter_actor_get_paint_opacity (actor) * par= ams.opacity * priv->opacity) / (255 * 255), -- priv->shadow_clip); -+ clip, -+ clip_shadow_under_window (self)); /* clip_stri= ctly - not just as an optimization */ -+ -+ if (clip && clip !=3D priv->shadow_clip) -+ cairo_region_destroy (clip); - } -=20 - CLUTTER_ACTOR_CLASS (meta_window_actor_parent_class)->paint (actor); -@@ -1787,6 +1826,12 @@ meta_window_actor_set_visible_region_beneath (Met= aWindowActor *self, - { - meta_window_actor_clear_shadow_clip (self); - priv->shadow_clip =3D cairo_region_copy (beneath_region); -+ -+ if (clip_shadow_under_window (self)) -+ { -+ cairo_region_t *frame_bounds =3D meta_window_get_frame_bounds= (priv->window); -+ cairo_region_subtract (priv->shadow_clip, frame_bounds); -+ } - } - } -=20 -diff --git a/src/core/frame.c b/src/core/frame.c -index 4db0002..155a0b8 100644 ---- a/src/core/frame.c -+++ b/src/core/frame.c -@@ -328,7 +328,7 @@ meta_frame_calc_geometry (MetaFrame *frame, - *geomp =3D geom; - } -=20 --static void -+static gboolean - update_shape (MetaFrame *frame) - { - if (frame->need_reapply_frame_shape) -@@ -339,10 +339,14 @@ update_shape (MetaFrame *frame) - frame->rect.height, - frame->window->has_shape); - frame->need_reapply_frame_shape =3D FALSE; -+ -+ return TRUE; - } -+ else -+ return FALSE; - } -=20 --void -+gboolean - meta_frame_sync_to_window (MetaFrame *frame, - int resize_gravity, - gboolean need_move, -@@ -350,8 +354,7 @@ meta_frame_sync_to_window (MetaFrame *frame, - { - if (!(need_move || need_resize)) - { -- update_shape (frame); -- return; -+ return update_shape (frame); - } -=20 - meta_topic (META_DEBUG_GEOMETRY, -@@ -401,6 +404,17 @@ meta_frame_sync_to_window (MetaFrame *frame, - meta_ui_repaint_frame (frame->window->screen->ui, - frame->xwindow); - } -+ -+ return need_resize; -+} -+ -+cairo_region_t * -+meta_frame_get_frame_bounds (MetaFrame *frame) -+{ -+ return meta_ui_get_frame_bounds (frame->window->screen->ui, -+ frame->xwindow, -+ frame->rect.width, -+ frame->rect.height); - } -=20 - void -diff --git a/src/core/frame.h b/src/core/frame.h -index 019d6b3..7a637e8 100644 ---- a/src/core/frame.h -+++ b/src/core/frame.h -@@ -73,11 +73,13 @@ Window meta_frame_get_xwindow (MetaFrame *fr= ame); - /* These should ONLY be called from meta_window_move_resize_internal */ - void meta_frame_calc_geometry (MetaFrame *frame, - MetaFrameGeometry *geomp); --void meta_frame_sync_to_window (MetaFrame *frame, -+gboolean meta_frame_sync_to_window (MetaFrame *frame, - int gravity, - gboolean need_move, - gboolean need_resize); -=20 -+cairo_region_t *meta_frame_get_frame_bounds (MetaFrame *frame); -+ - void meta_frame_set_screen_cursor (MetaFrame *frame, - MetaCursor cursor); -=20 -diff --git a/src/core/window-private.h b/src/core/window-private.h -index cbac91d..7909943 100644 ---- a/src/core/window-private.h -+++ b/src/core/window-private.h -@@ -42,6 +42,7 @@ - #include "stack.h" - #include "iconcache.h" - #include <X11/Xutil.h> -+#include <cairo.h> - #include <gdk-pixbuf/gdk-pixbuf.h> -=20 - typedef struct _MetaWindowQueue MetaWindowQueue; -@@ -316,6 +317,9 @@ struct _MetaWindow - /* if TRUE, application is buggy and SYNC resizing is turned off */ - guint disable_sync : 1; -=20 -+ /* if non-NULL, the bounds of the window frame */ -+ cairo_region_t *frame_bounds; -+ - /* Note: can be NULL */ - GSList *struts; -=20 -diff --git a/src/core/window.c b/src/core/window.c -index d442932..aa6d75c 100644 ---- a/src/core/window.c -+++ b/src/core/window.c -@@ -181,6 +181,9 @@ meta_window_finalize (GObject *object) - if (window->mini_icon) - g_object_unref (G_OBJECT (window->mini_icon)); -=20 -+ if (window->frame_bounds) -+ cairo_region_destroy (window->frame_bounds); -+ - meta_icon_cache_free (&window->icon_cache); -=20 - g_free (window->sm_client_id); -@@ -4295,6 +4298,7 @@ meta_window_move_resize_internal (MetaWindow = *window, - int frame_size_dy; - int size_dx; - int size_dy; -+ gboolean frame_shape_changed =3D FALSE; - gboolean is_configure_request; - gboolean do_gravity_adjust; - gboolean is_user_action; -@@ -4598,9 +4602,9 @@ meta_window_move_resize_internal (MetaWindow = *window, - meta_window_set_gravity (window, StaticGravity); -=20 - if (configure_frame_first && window->frame) -- meta_frame_sync_to_window (window->frame, -- gravity, -- need_move_frame, need_resize_frame); -+ frame_shape_changed =3D meta_frame_sync_to_window (window->frame, -+ gravity, -+ need_move_frame, n= eed_resize_frame); -=20 - values.border_width =3D 0; - values.x =3D client_move_x; -@@ -4655,9 +4659,9 @@ meta_window_move_resize_internal (MetaWindow = *window, - } -=20 - if (!configure_frame_first && window->frame) -- meta_frame_sync_to_window (window->frame, -- gravity, -- need_move_frame, need_resize_frame); -+ frame_shape_changed =3D meta_frame_sync_to_window (window->frame, -+ gravity, -+ need_move_frame, n= eed_resize_frame); -=20 - /* Put gravity back to be nice to lesser window managers */ - if (use_static_gravity) -@@ -4700,6 +4704,12 @@ meta_window_move_resize_internal (MetaWindow = *window, - * b) all constraints are obeyed by window->rect and frame->rect - */ -=20 -+ if (frame_shape_changed && window->frame_bounds) -+ { -+ cairo_region_destroy (window->frame_bounds); -+ window->frame_bounds =3D NULL; -+ } -+ - if (meta_prefs_get_attach_modal_dialogs ()) - meta_window_foreach_transient (window, move_attached_dialog, NULL); - } -@@ -10204,3 +10214,24 @@ meta_window_get_frame_type (MetaWindow *window) - return base_type; - } - } -+ -+/** -+ * meta_window_get_frame_bounds: -+ * -+ * Gets a region representing the outer bounds of the window's frame. -+ * -+ * Return value: (transfer none) (allow-none): a #cairo_region_t -+ * holding the outer bounds of the window, or %NULL if the window -+ * doesn't have a frame. -+ */ -+cairo_region_t * -+meta_window_get_frame_bounds (MetaWindow *window) -+{ -+ if (!window->frame_bounds) -+ { -+ if (window->frame) -+ window->frame_bounds =3D meta_frame_get_frame_bounds (window->f= rame); -+ } -+ -+ return window->frame_bounds; -+} -diff --git a/src/meta/window.h b/src/meta/window.h -index a1c4b75..985a146 100644 ---- a/src/meta/window.h -+++ b/src/meta/window.h -@@ -23,6 +23,7 @@ - #define META_WINDOW_H -=20 - #include <glib-object.h> -+#include <cairo.h> - #include <X11/Xlib.h> -=20 - #include <meta/boxes.h> -@@ -156,4 +157,6 @@ const char *meta_window_get_mutter_hints (MetaWindow= *window); -=20 - MetaFrameType meta_window_get_frame_type (MetaWindow *window); -=20 -+cairo_region_t *meta_window_get_frame_bounds (MetaWindow *window); -+ - #endif -diff --git a/src/ui/frames.c b/src/ui/frames.c -index 7c62898..520f29d 100644 ---- a/src/ui/frames.c -+++ b/src/ui/frames.c -@@ -797,60 +797,22 @@ apply_cairo_region_to_window (Display *disp= lay, - } - #endif -=20 --void --meta_frames_apply_shapes (MetaFrames *frames, -- Window xwindow, -- int new_window_width, -- int new_window_height, -- gboolean window_has_shape) -+static cairo_region_t * -+get_bounds_region (MetaFrames *frames, -+ MetaUIFrame *frame, -+ MetaFrameGeometry *fgeom, -+ int window_width, -+ int window_height) - { --#ifdef HAVE_SHAPE -- /* Apply shapes as if window had new_window_width, new_window_height = */ -- MetaUIFrame *frame; -- MetaFrameGeometry fgeom; -- cairo_rectangle_int_t rect; - cairo_region_t *corners_region; -- cairo_region_t *window_region; -- Display *display; -- =20 -- frame =3D meta_frames_lookup_window (frames, xwindow); -- g_return_if_fail (frame !=3D NULL); -- -- display =3D GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); -- -- meta_frames_calc_geometry (frames, frame, &fgeom); -+ cairo_region_t *bounds_region; -+ cairo_rectangle_int_t rect; -=20 -- if (!(fgeom.top_left_corner_rounded_radius !=3D 0 || -- fgeom.top_right_corner_rounded_radius !=3D 0 || -- fgeom.bottom_left_corner_rounded_radius !=3D 0 || -- fgeom.bottom_right_corner_rounded_radius !=3D 0 || -- window_has_shape)) -- { -- if (frame->shape_applied) -- { -- meta_topic (META_DEBUG_SHAPES, -- "Unsetting shape mask on frame 0x%lx\n", -- frame->xwindow); -- =20 -- XShapeCombineMask (display, frame->xwindow, -- ShapeBounding, 0, 0, None, ShapeSet); -- frame->shape_applied =3D FALSE; -- } -- else -- { -- meta_topic (META_DEBUG_SHAPES, -- "Frame 0x%lx still doesn't need a shape mask\n", -- frame->xwindow); -- } -- =20 -- return; /* nothing to do */ -- } -- =20 - corners_region =3D cairo_region_create (); - =20 -- if (fgeom.top_left_corner_rounded_radius !=3D 0) -+ if (fgeom->top_left_corner_rounded_radius !=3D 0) - { -- const int corner =3D fgeom.top_left_corner_rounded_radius; -+ const int corner =3D fgeom->top_left_corner_rounded_radius; - const float radius =3D sqrt(corner) + corner; - int i; -=20 -@@ -866,16 +828,16 @@ meta_frames_apply_shapes (MetaFrames *frames, - } - } -=20 -- if (fgeom.top_right_corner_rounded_radius !=3D 0) -+ if (fgeom->top_right_corner_rounded_radius !=3D 0) - { -- const int corner =3D fgeom.top_right_corner_rounded_radius; -+ const int corner =3D fgeom->top_right_corner_rounded_radius; - const float radius =3D sqrt(corner) + corner; - int i; -=20 - for (i=3D0; i<corner; i++) - { - const int width =3D floor(0.5 + radius - sqrt(radius*radius -= (radius-(i+0.5))*(radius-(i+0.5)))); -- rect.x =3D new_window_width - width; -+ rect.x =3D window_width - width; - rect.y =3D i; - rect.width =3D width; - rect.height =3D 1; -@@ -884,9 +846,9 @@ meta_frames_apply_shapes (MetaFrames *frames, - } - } -=20 -- if (fgeom.bottom_left_corner_rounded_radius !=3D 0) -+ if (fgeom->bottom_left_corner_rounded_radius !=3D 0) - { -- const int corner =3D fgeom.bottom_left_corner_rounded_radius; -+ const int corner =3D fgeom->bottom_left_corner_rounded_radius; - const float radius =3D sqrt(corner) + corner; - int i; -=20 -@@ -894,7 +856,7 @@ meta_frames_apply_shapes (MetaFrames *frames, - { - const int width =3D floor(0.5 + radius - sqrt(radius*radius -= (radius-(i+0.5))*(radius-(i+0.5)))); - rect.x =3D 0; -- rect.y =3D new_window_height - i - 1; -+ rect.y =3D window_height - i - 1; - rect.width =3D width; - rect.height =3D 1; - =20 -@@ -902,17 +864,17 @@ meta_frames_apply_shapes (MetaFrames *frames, - } - } -=20 -- if (fgeom.bottom_right_corner_rounded_radius !=3D 0) -+ if (fgeom->bottom_right_corner_rounded_radius !=3D 0) - { -- const int corner =3D fgeom.bottom_right_corner_rounded_radius; -+ const int corner =3D fgeom->bottom_right_corner_rounded_radius; - const float radius =3D sqrt(corner) + corner; - int i; -=20 - for (i=3D0; i<corner; i++) - { - const int width =3D floor(0.5 + radius - sqrt(radius*radius -= (radius-(i+0.5))*(radius-(i+0.5)))); -- rect.x =3D new_window_width - width; -- rect.y =3D new_window_height - i - 1; -+ rect.x =3D window_width - width; -+ rect.y =3D window_height - i - 1; - rect.width =3D width; - rect.height =3D 1; - =20 -@@ -920,19 +882,88 @@ meta_frames_apply_shapes (MetaFrames *frames, - } - } - =20 -- window_region =3D cairo_region_create (); -+ bounds_region =3D cairo_region_create (); - =20 - rect.x =3D 0; - rect.y =3D 0; -- rect.width =3D new_window_width; -- rect.height =3D new_window_height; -+ rect.width =3D window_width; -+ rect.height =3D window_height; -=20 -- cairo_region_union_rectangle (window_region, &rect); -+ cairo_region_union_rectangle (bounds_region, &rect); -=20 -- cairo_region_subtract (window_region, corners_region); -+ cairo_region_subtract (bounds_region, corners_region); -=20 - cairo_region_destroy (corners_region); -+ -+ return bounds_region; -+} -+ -+static cairo_region_t * -+get_client_region (MetaFrameGeometry *fgeom, -+ int window_width, -+ int window_height) -+{ -+ cairo_rectangle_int_t rect; -+ -+ rect.x =3D fgeom->left_width; -+ rect.y =3D fgeom->top_height; -+ rect.width =3D window_width - fgeom->right_width - rect.x; -+ rect.height =3D window_height - fgeom->bottom_height - rect.y; -+ -+ return cairo_region_create_rectangle (&rect); -+} -+ -+void -+meta_frames_apply_shapes (MetaFrames *frames, -+ Window xwindow, -+ int new_window_width, -+ int new_window_height, -+ gboolean window_has_shape) -+{ -+#ifdef HAVE_SHAPE -+ /* Apply shapes as if window had new_window_width, new_window_height = */ -+ MetaUIFrame *frame; -+ MetaFrameGeometry fgeom; -+ cairo_region_t *window_region; -+ Display *display; - =20 -+ frame =3D meta_frames_lookup_window (frames, xwindow); -+ g_return_if_fail (frame !=3D NULL); -+ -+ display =3D GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); -+ -+ meta_frames_calc_geometry (frames, frame, &fgeom); -+ -+ if (!(fgeom.top_left_corner_rounded_radius !=3D 0 || -+ fgeom.top_right_corner_rounded_radius !=3D 0 || -+ fgeom.bottom_left_corner_rounded_radius !=3D 0 || -+ fgeom.bottom_right_corner_rounded_radius !=3D 0 || -+ window_has_shape)) -+ { -+ if (frame->shape_applied) -+ { -+ meta_topic (META_DEBUG_SHAPES, -+ "Unsetting shape mask on frame 0x%lx\n", -+ frame->xwindow); -+ -+ XShapeCombineMask (display, frame->xwindow, -+ ShapeBounding, 0, 0, None, ShapeSet); -+ frame->shape_applied =3D FALSE; -+ } -+ else -+ { -+ meta_topic (META_DEBUG_SHAPES, -+ "Frame 0x%lx still doesn't need a shape mask\n", -+ frame->xwindow); -+ } -+ -+ return; /* nothing to do */ -+ } -+ -+ window_region =3D get_bounds_region (frames, frame, -+ &fgeom, -+ new_window_width, new_window_heigh= t); -+ - if (window_has_shape) - { - /* The client window is oclock or something and has a shape -@@ -984,15 +1015,10 @@ meta_frames_apply_shapes (MetaFrames *frames, - /* Punch the client area out of the normal frame shape, - * then union it with the shape_window's existing shape - */ -- client_region =3D cairo_region_create (); -- =20 -- rect.x =3D fgeom.left_width; -- rect.y =3D fgeom.top_height; -- rect.width =3D new_window_width - fgeom.right_width - rect.x; -- rect.height =3D new_window_height - fgeom.bottom_height - rect.y; -+ client_region =3D get_client_region (&fgeom, -+ new_window_width, -+ new_window_height); -=20 -- cairo_region_union_rectangle (client_region, &rect); -- =20 - cairo_region_subtract (window_region, client_region); -=20 - cairo_region_destroy (client_region); -@@ -1027,6 +1053,25 @@ meta_frames_apply_shapes (MetaFrames *frames, - #endif /* HAVE_SHAPE */ - } -=20 -+cairo_region_t * -+meta_frames_get_frame_bounds (MetaFrames *frames, -+ Window xwindow, -+ int window_width, -+ int window_height) -+{ -+ MetaUIFrame *frame; -+ MetaFrameGeometry fgeom; -+ -+ frame =3D meta_frames_lookup_window (frames, xwindow); -+ g_return_val_if_fail (frame !=3D NULL, NULL); -+ -+ meta_frames_calc_geometry (frames, frame, &fgeom); -+ -+ return get_bounds_region (frames, frame, -+ &fgeom, -+ window_width, window_height); -+} -+ - void - meta_frames_move_resize_frame (MetaFrames *frames, - Window xwindow, -diff --git a/src/ui/frames.h b/src/ui/frames.h -index 5fdba63..d1807df 100644 ---- a/src/ui/frames.h -+++ b/src/ui/frames.h -@@ -144,6 +144,10 @@ void meta_frames_apply_shapes (MetaFrames *frames, - int new_window_width, - int new_window_height, - gboolean window_has_shape); -+cairo_region_t *meta_frames_get_frame_bounds (MetaFrames *frames, -+ Window xwindow, -+ int window_width, -+ int window_height= ); - void meta_frames_move_resize_frame (MetaFrames *frames, - Window xwindow, - int x, -diff --git a/src/ui/ui.c b/src/ui/ui.c -index 575f2ae..5381b8d 100644 ---- a/src/ui/ui.c -+++ b/src/ui/ui.c -@@ -470,6 +470,16 @@ meta_ui_apply_frame_shape (MetaUI *ui, - window_has_shape); - } -=20 -+cairo_region_t * -+meta_ui_get_frame_bounds (MetaUI *ui, -+ Window xwindow, -+ int window_width, -+ int window_height) -+{ -+ return meta_frames_get_frame_bounds (ui->frames, xwindow, -+ window_width, window_height); -+} -+ - void - meta_ui_queue_frame_draw (MetaUI *ui, - Window xwindow) -diff --git a/src/ui/ui.h b/src/ui/ui.h -index cc449bd..9a33d9d 100644 ---- a/src/ui/ui.h -+++ b/src/ui/ui.h -@@ -28,6 +28,7 @@ - #include <meta/common.h> - #include <X11/Xlib.h> - #include <X11/Xutil.h> -+#include <cairo.h> - #include <glib.h> - #include <gdk-pixbuf/gdk-pixbuf.h> -=20 -@@ -104,6 +105,11 @@ void meta_ui_apply_frame_shape (MetaUI *ui, - int new_window_height, - gboolean window_has_shape); -=20 -+cairo_region_t *meta_ui_get_frame_bounds (MetaUI *ui, -+ Window xwindow, -+ int window_width, -+ int window_height); -+ - void meta_ui_queue_frame_draw (MetaUI *ui, - Window xwindow); -=20 --- -cgit v0.9 diff --git a/x11-wm/mutter/files/mutter-3.0.2-fix-xshape.patch b/x11-wm/m= utter/files/mutter-3.0.2-fix-xshape.patch deleted file mode 100644 index bc65ab2..0000000 --- a/x11-wm/mutter/files/mutter-3.0.2-fix-xshape.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 59efae8920ff919beffa3816874c2e7cc85f3f08 Mon Sep 17 00:00:00 2001 -From: Jasper St. Pierre <jstpierre@mecheye.net> -Date: Wed, 25 May 2011 20:47:53 -0400 -Subject: [PATCH] Fix XShape - -Commit c3a04bf unintentionally broke XShape handling. By studying the co= de -extremely carefully, I found this inconsistency with the code that was -there before. - -https://bugzilla.gnome.org/show_bug.cgi?id=3D635268 ---- - src/ui/frames.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/ui/frames.c b/src/ui/frames.c -index 9f0126c..4352e38 100644 ---- a/src/ui/frames.c -+++ b/src/ui/frames.c -@@ -880,7 +880,7 @@ apply_cairo_region_to_window (Display *displa= y, -=20 - XShapeCombineRectangles (display, xwindow, - ShapeBounding, 0, 0, rects, n_rects, -- ShapeSet, YXBanded); -+ op, YXBanded); -=20 - g_free (rects); - } ---=20 -1.7.5.1 - diff --git a/x11-wm/mutter/files/mutter-3.0.2-frame-region-cairo-region.p= atch b/x11-wm/mutter/files/mutter-3.0.2-frame-region-cairo-region.patch deleted file mode 100644 index 2a41fea..0000000 --- a/x11-wm/mutter/files/mutter-3.0.2-frame-region-cairo-region.patch +++ /dev/null @@ -1,234 +0,0 @@ -From c3a04bf3948dae31cbd64e637c290ddee7bcc73b Mon Sep 17 00:00:00 2001 -From: Owen W. Taylor <otaylor@fishsoup.net> -Date: Sun, 20 Mar 2011 20:26:27 +0000 -Subject: Convert frame region handling to cairo regions - -It's useful to get frame shapes and manipulate them within Mutter, for -example so that the compositor can use them to clip drawing. -For this, we'll need the regions as cairo regions not X regions, so -convert frame shaping code to work in terms of cairo_region_t. - -https://bugzilla.gnome.org/show_bug.cgi?id=3D635268 ---- -diff --git a/src/ui/frames.c b/src/ui/frames.c -index 9c4782e..7c62898 100644 ---- a/src/ui/frames.c -+++ b/src/ui/frames.c -@@ -764,6 +764,39 @@ meta_frames_unflicker_bg (MetaFrames *frames, - set_background_none (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()= ), frame->xwindow); - } -=20 -+#ifdef HAVE_SHAPE -+static void -+apply_cairo_region_to_window (Display *display, -+ Window xwindow, -+ cairo_region_t *region, -+ int op) -+{ -+ int n_rects, i; -+ XRectangle *rects; -+ -+ n_rects =3D cairo_region_num_rectangles (region); -+ rects =3D g_new (XRectangle, n_rects); -+ -+ for (i =3D 0; i < n_rects; i++) -+ { -+ cairo_rectangle_int_t rect; -+ -+ cairo_region_get_rectangle (region, i, &rect); -+ -+ rects[i].x =3D rect.x; -+ rects[i].y =3D rect.y; -+ rects[i].width =3D rect.width; -+ rects[i].height =3D rect.height; -+ } -+ -+ XShapeCombineRectangles (display, xwindow, -+ ShapeBounding, 0, 0, rects, n_rects, -+ ShapeSet, YXBanded); -+ -+ g_free (rects); -+} -+#endif -+ - void - meta_frames_apply_shapes (MetaFrames *frames, - Window xwindow, -@@ -775,9 +808,9 @@ meta_frames_apply_shapes (MetaFrames *frames, - /* Apply shapes as if window had new_window_width, new_window_height = */ - MetaUIFrame *frame; - MetaFrameGeometry fgeom; -- XRectangle xrect; -- Region corners_xregion; -- Region window_xregion; -+ cairo_rectangle_int_t rect; -+ cairo_region_t *corners_region; -+ cairo_region_t *window_region; - Display *display; - =20 - frame =3D meta_frames_lookup_window (frames, xwindow); -@@ -813,7 +846,7 @@ meta_frames_apply_shapes (MetaFrames *frames, - return; /* nothing to do */ - } - =20 -- corners_xregion =3D XCreateRegion (); -+ corners_region =3D cairo_region_create (); - =20 - if (fgeom.top_left_corner_rounded_radius !=3D 0) - { -@@ -824,12 +857,12 @@ meta_frames_apply_shapes (MetaFrames *frames, - for (i=3D0; i<corner; i++) - { - const int width =3D floor(0.5 + radius - sqrt(radius*radius -= (radius-(i+0.5))*(radius-(i+0.5)))); -- xrect.x =3D 0; -- xrect.y =3D i; -- xrect.width =3D width; -- xrect.height =3D 1; -+ rect.x =3D 0; -+ rect.y =3D i; -+ rect.width =3D width; -+ rect.height =3D 1; - =20 -- XUnionRectWithRegion (&xrect, corners_xregion, corners_xregio= n); -+ cairo_region_union_rectangle (corners_region, &rect); - } - } -=20 -@@ -842,12 +875,12 @@ meta_frames_apply_shapes (MetaFrames *frames, - for (i=3D0; i<corner; i++) - { - const int width =3D floor(0.5 + radius - sqrt(radius*radius -= (radius-(i+0.5))*(radius-(i+0.5)))); -- xrect.x =3D new_window_width - width; -- xrect.y =3D i; -- xrect.width =3D width; -- xrect.height =3D 1; -+ rect.x =3D new_window_width - width; -+ rect.y =3D i; -+ rect.width =3D width; -+ rect.height =3D 1; - =20 -- XUnionRectWithRegion (&xrect, corners_xregion, corners_xregio= n); -+ cairo_region_union_rectangle (corners_region, &rect); - } - } -=20 -@@ -860,12 +893,12 @@ meta_frames_apply_shapes (MetaFrames *frames, - for (i=3D0; i<corner; i++) - { - const int width =3D floor(0.5 + radius - sqrt(radius*radius -= (radius-(i+0.5))*(radius-(i+0.5)))); -- xrect.x =3D 0; -- xrect.y =3D new_window_height - i - 1; -- xrect.width =3D width; -- xrect.height =3D 1; -+ rect.x =3D 0; -+ rect.y =3D new_window_height - i - 1; -+ rect.width =3D width; -+ rect.height =3D 1; - =20 -- XUnionRectWithRegion (&xrect, corners_xregion, corners_xregio= n); -+ cairo_region_union_rectangle (corners_region, &rect); - } - } -=20 -@@ -878,27 +911,27 @@ meta_frames_apply_shapes (MetaFrames *frames, - for (i=3D0; i<corner; i++) - { - const int width =3D floor(0.5 + radius - sqrt(radius*radius -= (radius-(i+0.5))*(radius-(i+0.5)))); -- xrect.x =3D new_window_width - width; -- xrect.y =3D new_window_height - i - 1; -- xrect.width =3D width; -- xrect.height =3D 1; -+ rect.x =3D new_window_width - width; -+ rect.y =3D new_window_height - i - 1; -+ rect.width =3D width; -+ rect.height =3D 1; - =20 -- XUnionRectWithRegion (&xrect, corners_xregion, corners_xregio= n); -+ cairo_region_union_rectangle (corners_region, &rect); - } - } - =20 -- window_xregion =3D XCreateRegion (); -+ window_region =3D cairo_region_create (); - =20 -- xrect.x =3D 0; -- xrect.y =3D 0; -- xrect.width =3D new_window_width; -- xrect.height =3D new_window_height; -+ rect.x =3D 0; -+ rect.y =3D 0; -+ rect.width =3D new_window_width; -+ rect.height =3D new_window_height; -=20 -- XUnionRectWithRegion (&xrect, window_xregion, window_xregion); -+ cairo_region_union_rectangle (window_region, &rect); -=20 -- XSubtractRegion (window_xregion, corners_xregion, window_xregion); -+ cairo_region_subtract (window_region, corners_region); -=20 -- XDestroyRegion (corners_xregion); -+ cairo_region_destroy (corners_region); - =20 - if (window_has_shape) - { -@@ -911,7 +944,7 @@ meta_frames_apply_shapes (MetaFrames *frames, - XSetWindowAttributes attrs; =20 - Window shape_window; - Window client_window; -- Region client_xregion; -+ cairo_region_t *client_region; - GdkScreen *screen; - int screen_number; - =20 -@@ -951,21 +984,21 @@ meta_frames_apply_shapes (MetaFrames *frames, - /* Punch the client area out of the normal frame shape, - * then union it with the shape_window's existing shape - */ -- client_xregion =3D XCreateRegion (); -+ client_region =3D cairo_region_create (); - =20 -- xrect.x =3D fgeom.left_width; -- xrect.y =3D fgeom.top_height; -- xrect.width =3D new_window_width - fgeom.right_width - xrect.x; -- xrect.height =3D new_window_height - fgeom.bottom_height - xrect.= y; -+ rect.x =3D fgeom.left_width; -+ rect.y =3D fgeom.top_height; -+ rect.width =3D new_window_width - fgeom.right_width - rect.x; -+ rect.height =3D new_window_height - fgeom.bottom_height - rect.y; -=20 -- XUnionRectWithRegion (&xrect, client_xregion, client_xregion); -+ cairo_region_union_rectangle (client_region, &rect); - =20 -- XSubtractRegion (window_xregion, client_xregion, window_xregion); -+ cairo_region_subtract (window_region, client_region); -=20 -- XDestroyRegion (client_xregion); -- =20 -- XShapeCombineRegion (display, shape_window, -- ShapeBounding, 0, 0, window_xregion, ShapeUn= ion); -+ cairo_region_destroy (client_region); -+ -+ apply_cairo_region_to_window (display, shape_window, -+ window_region, ShapeUnion); - =20 - /* Now copy shape_window shape to the real frame */ - XShapeCombineShape (display, frame->xwindow, ShapeBounding, -@@ -984,13 +1017,13 @@ meta_frames_apply_shapes (MetaFrames *frames, - "Frame 0x%lx has shaped corners\n", - frame->xwindow); - =20 -- XShapeCombineRegion (display, frame->xwindow, -- ShapeBounding, 0, 0, window_xregion, ShapeSe= t); -+ apply_cairo_region_to_window (display, frame->xwindow, -+ window_region, ShapeSet); - } - =20 - frame->shape_applied =3D TRUE; - =20 -- XDestroyRegion (window_xregion); -+ cairo_region_destroy (window_region); - #endif /* HAVE_SHAPE */ - } -=20 --- -cgit v0.9 diff --git a/x11-wm/mutter/files/mutter-3.1.3.1-crash-on-exit.patch b/x11= -wm/mutter/files/mutter-3.1.3.1-crash-on-exit.patch new file mode 100644 index 0000000..65d9ab4 --- /dev/null +++ b/x11-wm/mutter/files/mutter-3.1.3.1-crash-on-exit.patch @@ -0,0 +1,37 @@ +From d2b63eaf1f5486380595f3ebb7a26386c1f20363 Mon Sep 17 00:00:00 2001 +From: Dan Winship <danw@gnome.org> +Date: Tue, 12 Jul 2011 17:07:15 +0000 +Subject: fix a crash-on-exit + +meta_frames_destroy() was not safe to be called multiple times, which +was causing a crash on exit due to something else changing somewhere +that makes it get called multiple times. + +https://bugzilla.gnome.org/show_bug.cgi?id=3D654489 +--- +diff --git a/src/ui/frames.c b/src/ui/frames.c +index d9e2bca..167d5dc 100644 +--- a/src/ui/frames.c ++++ b/src/ui/frames.c +@@ -313,8 +313,17 @@ meta_frames_destroy (GtkWidget *object) + } + g_slist_free (winlist); +=20 +- g_object_unref (frames->normal_style); +- g_hash_table_destroy (frames->style_variants); ++ if (frames->normal_style) ++ { ++ g_object_unref (frames->normal_style); ++ frames->normal_style =3D NULL; ++ } ++ ++ if (frames->style_variants) ++ { ++ g_hash_table_destroy (frames->style_variants); ++ frames->style_variants =3D NULL; ++ } +=20 + GTK_WIDGET_CLASS (meta_frames_parent_class)->destroy (object); + } +-- +cgit v0.9 diff --git a/x11-wm/mutter/files/mutter-3.1.3.1-meta_later-reentrant.patc= h b/x11-wm/mutter/files/mutter-3.1.3.1-meta_later-reentrant.patch new file mode 100644 index 0000000..63387f8 --- /dev/null +++ b/x11-wm/mutter/files/mutter-3.1.3.1-meta_later-reentrant.patch @@ -0,0 +1,141 @@ +From cd7a9680932868d1d2ef5447c77712cef9a443dd Mon Sep 17 00:00:00 2001 +From: Dan Winship <danw@gnome.org> +Date: Tue, 29 Mar 2011 19:18:57 +0000 +Subject: util: fix a reentrancy problem with meta_later + +Calling meta_later_add() or meta_later_remove() from within a +META_LATER_BEFORE_REDRAW callback ended up being a no-op, because of +how run_repaint_laters() was fiddling with the laters list. (This +resulted in a crash in window.c:idle_calc_repaint(), which assumed it +would only be called when a certain queue was non-empty, but was +getting called anyway because of a failed meta_later_remove() call.) + +Fix this by having run_repaint_laters() work on a copy of the laters +list instead, and add refcounting to MetaLater so that removing a +later that run_repaint_laters() hasn't gotten to yet won't cause +problems. + +https://bugzilla.gnome.org/show_bug.cgi?id=3D642957 +--- +diff --git a/src/core/util.c b/src/core/util.c +index aea1210..2ce5f79 100644 +--- a/src/core/util.c ++++ b/src/core/util.c +@@ -708,6 +708,7 @@ static guint last_later_id =3D 0; + typedef struct + { + guint id; ++ guint ref_count; + MetaLaterType when; + GSourceFunc func; + gpointer data; +@@ -724,13 +725,29 @@ static guint later_repaint_func =3D 0; + static void ensure_later_repaint_func (void); +=20 + static void ++unref_later (MetaLater *later) ++{ ++ if (--later->ref_count =3D=3D 0) ++ { ++ if (later->notify) ++ { ++ later->notify (later->data); ++ later->notify =3D NULL; ++ } ++ g_slice_free (MetaLater, later); ++ } ++} ++ ++static void + destroy_later (MetaLater *later) + { + if (later->source) +- g_source_remove (later->source); +- if (later->notify) +- later->notify (later->data); +- g_slice_free (MetaLater, later); ++ { ++ g_source_remove (later->source); ++ later->source =3D 0; ++ } ++ later->func =3D NULL; ++ unref_later (later); + } +=20 + /* Used to sort the list of laters with the highest priority +@@ -746,34 +763,41 @@ compare_laters (gconstpointer a, + static gboolean + run_repaint_laters (gpointer data) + { +- GSList *old_laters =3D laters; ++ GSList *laters_copy; + GSList *l; + gboolean keep_timeline_running =3D FALSE; +- laters =3D NULL; +=20 +- for (l =3D old_laters; l; l =3D l->next) ++ laters_copy =3D NULL; ++ for (l =3D laters; l; l =3D l->next) + { + MetaLater *later =3D l->data; + if (later->source =3D=3D 0 || + (later->when <=3D META_LATER_BEFORE_REDRAW && !later->run_onc= e)) + { +- if (later->func (later->data)) +- { +- if (later->source =3D=3D 0) +- keep_timeline_running =3D TRUE; +- laters =3D g_slist_insert_sorted (laters, later, compare_= laters); +- } +- else +- destroy_later (later); ++ later->ref_count++; ++ laters_copy =3D g_slist_prepend (laters_copy, later); ++ } ++ } ++ laters_copy =3D g_slist_reverse (laters_copy); ++ ++ for (l =3D laters_copy; l; l =3D l->next) ++ { ++ MetaLater *later =3D l->data; ++ ++ if (later->func && later->func (later->data)) ++ { ++ if (later->source =3D=3D 0) ++ keep_timeline_running =3D TRUE; + } + else +- laters =3D g_slist_insert_sorted (laters, later, compare_laters= ); ++ meta_later_remove (later->id); ++ unref_later (later); + } +=20 + if (!keep_timeline_running) + clutter_timeline_stop (later_timeline); +=20 +- g_slist_free (old_laters); ++ g_slist_free (laters_copy); +=20 + /* Just keep the repaint func around - it's cheap if the list is empt= y */ + return TRUE; +@@ -800,9 +824,7 @@ call_idle_later (gpointer data) +=20 + if (!later->func (later->data)) + { +- laters =3D g_slist_remove (laters, later); +- later->source =3D 0; +- destroy_later (later); ++ meta_later_remove (later->id); + return FALSE; + } + else +@@ -838,6 +860,7 @@ meta_later_add (MetaLaterType when, + MetaLater *later =3D g_slice_new0 (MetaLater); +=20 + later->id =3D ++last_later_id; ++ later->ref_count =3D 1; + later->when =3D when; + later->func =3D func; + later->data =3D data; +-- +cgit v0.9 diff --git a/x11-wm/mutter/mutter-3.0.2.1.ebuild b/x11-wm/mutter/mutter-3= .1.3.1.ebuild similarity index 81% rename from x11-wm/mutter/mutter-3.0.2.1.ebuild rename to x11-wm/mutter/mutter-3.1.3.1.ebuild index c5f7d14..3f8a0e9 100644 --- a/x11-wm/mutter/mutter-3.0.2.1.ebuild +++ b/x11-wm/mutter/mutter-3.1.3.1.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ =20 -EAPI=3D"3" +EAPI=3D"4" GCONF_DEBUG=3D"no" GNOME2_LA_PUNT=3D"yes" =20 @@ -78,12 +78,9 @@ pkg_setup() { } =20 src_prepare() { - # Fix argb window shadows: https://bugzilla.gnome.org/show_bug.cgi?id=3D= 635268 - # The first two patches are from upstream git master branch: - epatch "${FILESDIR}/${PN}-3.0.2-frame-region-cairo-region.patch" - epatch "${FILESDIR}/${PN}-3.0.2-argb-windows-shadow.patch" - # The third is from comment 33 in the gnome bug and unbreaks XShape han= dling - epatch "${FILESDIR}/${PN}-3.0.2-fix-xshape.patch" + # Crash fixes from upstream git, will be in next release + epatch "${FILESDIR}/${P}-crash-on-exit.patch" + epatch "${FILESDIR}/${P}-meta_later-reentrant.patch" =20 gnome2_src_prepare } diff --git a/x11-wm/mutter/mutter-9999.ebuild b/x11-wm/mutter/mutter-9999= .ebuild index 0eee508..8758e2c 100644 --- a/x11-wm/mutter/mutter-9999.ebuild +++ b/x11-wm/mutter/mutter-9999.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ =20 -EAPI=3D"3" +EAPI=3D"4" GCONF_DEBUG=3D"no" GNOME2_LA_PUNT=3D"yes" =20 @@ -29,7 +29,7 @@ COMMON_DEPEND=3D">=3Dx11-libs/pango-1.2[X,introspection= ?] >=3Dx11-libs/gtk+-2.91.7:3[introspection?] >=3Dgnome-base/gconf-2:2 >=3Ddev-libs/glib-2.14:2 - >=3Dmedia-libs/clutter-1.2:1.0 + >=3Dmedia-libs/clutter-1.7.5:1.0 >=3Dmedia-libs/libcanberra-0.26[gtk3] >=3Dx11-libs/startup-notification-0.7 >=3Dx11-libs/libXcomposite-0.2