diff --git a/0002-Revert-meta-shadow-factory-remove-some-deprecated-co.patch b/0002-Revert-meta-shadow-factory-remove-some-deprecated-co.patch deleted file mode 100644 index d02c253..0000000 --- a/0002-Revert-meta-shadow-factory-remove-some-deprecated-co.patch +++ /dev/null @@ -1,163 +0,0 @@ -From eecd4ca2bff650e9759af39080de8c4b0057c565 Mon Sep 17 00:00:00 2001 -From: Leigh Scott -Date: Thu, 21 Nov 2019 14:04:57 +0000 -Subject: [PATCH 2/3] Revert "meta-shadow-factory: remove some deprecated - cogl_set_source calls (#497)" - -This reverts commit 66efde884efce35afd433efbda966774a65c9d85. ---- - src/compositor/meta-shadow-factory-private.h | 1 - - src/compositor/meta-shadow-factory.c | 54 +++++++------------- - src/compositor/meta-window-actor.c | 5 -- - 3 files changed, 18 insertions(+), 42 deletions(-) - -diff --git a/src/compositor/meta-shadow-factory-private.h b/src/compositor/meta-shadow-factory-private.h -index fcdf53e..885e88d 100644 ---- a/src/compositor/meta-shadow-factory-private.h -+++ b/src/compositor/meta-shadow-factory-private.h -@@ -42,7 +42,6 @@ MetaShadow *meta_shadow_ref (MetaShadow *shadow); - void meta_shadow_unref (MetaShadow *shadow); - CoglTexture*meta_shadow_get_texture (MetaShadow *shadow); - void meta_shadow_paint (MetaShadow *shadow, -- CoglFramebuffer *framebuffer, - int window_x, - int window_y, - int window_width, -diff --git a/src/compositor/meta-shadow-factory.c b/src/compositor/meta-shadow-factory.c -index ac963ef..d898aab 100644 ---- a/src/compositor/meta-shadow-factory.c -+++ b/src/compositor/meta-shadow-factory.c -@@ -198,16 +198,14 @@ meta_shadow_unref (MetaShadow *shadow) - * size needs to be passed in here.) - */ - LOCAL_SYMBOL void --meta_shadow_paint (MetaShadow *shadow, -- CoglFramebuffer *framebuffer, -- int window_x, -- int window_y, -- int window_width, -- int window_height, -- guint8 opacity, -- cairo_region_t *clip, -- gboolean clip_strictly) -- -+meta_shadow_paint (MetaShadow *shadow, -+ int window_x, -+ int window_y, -+ int window_width, -+ int window_height, -+ guint8 opacity, -+ cairo_region_t *clip, -+ gboolean clip_strictly) - { - float texture_width = cogl_texture_get_width (shadow->texture); - float texture_height = cogl_texture_get_height (shadow->texture); -@@ -219,6 +217,8 @@ meta_shadow_paint (MetaShadow *shadow, - int n_x, n_y; - gboolean source_updated = FALSE; - -+ cogl_set_source (shadow->pipeline); -+ - if (shadow->scale_width) - { - n_x = 3; -@@ -300,7 +300,7 @@ meta_shadow_paint (MetaShadow *shadow, - { - cogl_pipeline_set_color4ub (shadow->pipeline, - opacity, opacity, opacity, opacity); --// cogl_set_source (shadow->pipeline); do not believe needed, but still there in mutter -+ cogl_set_source (shadow->pipeline); - source_updated = TRUE; - } - -@@ -313,30 +313,24 @@ meta_shadow_paint (MetaShadow *shadow, - if (overlap == CAIRO_REGION_OVERLAP_IN || - (overlap == CAIRO_REGION_OVERLAP_PART && !clip_strictly)) - { -- cogl_framebuffer_draw_textured_rectangle (framebuffer, -- shadow->pipeline, -- 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]); -+ 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 == CAIRO_REGION_OVERLAP_PART) - { - cairo_region_t *intersection; - int n_rectangles, k; -- float *rects; - - intersection = cairo_region_create_rectangle (&dest_rect); - cairo_region_intersect (intersection, clip); - - n_rectangles = cairo_region_num_rectangles (intersection); -- rects = g_alloca (sizeof (float) * 8 * n_rectangles); -- - for (k = 0; k < n_rectangles; k++) - { - cairo_rectangle_int_t rect; - float src_x1, src_x2, src_y1, src_y2; -- int pos; - - cairo_region_get_rectangle (intersection, k, &rect); - -@@ -353,23 +347,11 @@ meta_shadow_paint (MetaShadow *shadow, - src_y2 = (src_y[j] * (dest_rect.y + dest_rect.height - (rect.y + rect.height)) + - src_y[j + 1] * (rect.y + rect.height - dest_rect.y)) / dest_rect.height; - -- pos = k*4; -- rects[pos++] = rect.x; -- rects[pos++] = rect.y; -- rects[pos++] = rect.x + rect.width; -- rects[pos++] = rect.y + rect.height; -- -- rects[pos++] = src_x1; -- rects[pos++] = src_y1; -- rects[pos++] = src_x2; -- rects[pos] = src_y2; -+ cogl_rectangle_with_texture_coords (rect.x, rect.y, -+ rect.x + rect.width, rect.y + rect.height, -+ src_x1, src_y1, src_x2, src_y2); - } - -- cogl_framebuffer_draw_textured_rectangles (framebuffer, -- shadow->pipeline, -- rects, -- n_rectangles); -- - cairo_region_destroy (intersection); - } - } -diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c -index d9b47d9..6bf2441 100644 ---- a/src/compositor/meta-window-actor.c -+++ b/src/compositor/meta-window-actor.c -@@ -848,10 +848,8 @@ meta_window_actor_paint (ClutterActor *actor) - { - MetaWindowActor *self = META_WINDOW_ACTOR (actor); - MetaWindowActorPrivate *priv = self->priv; -- CoglFramebuffer *framebuffer = NULL; - gboolean appears_focused = meta_window_appears_focused (priv->window); - MetaShadow *shadow = appears_focused ? priv->focused_shadow : priv->unfocused_shadow; -- - if (!priv->window->display->shadows_enabled) { - shadow = NULL; - } -@@ -890,10 +888,7 @@ meta_window_actor_paint (ClutterActor *actor) - cairo_region_subtract (clip, meta_window_get_frame_bounds (priv->window)); - } - -- framebuffer = cogl_get_draw_framebuffer (); -- - meta_shadow_paint (shadow, -- framebuffer, - params.x_offset + shape_bounds.x, - params.y_offset + shape_bounds.y, - shape_bounds.width, --- -2.23.0 - diff --git a/0003-Revert-window.c-various-minor-tweaks-small-speedup-4.patch b/0003-Revert-window.c-various-minor-tweaks-small-speedup-4.patch deleted file mode 100644 index 27ab48b..0000000 --- a/0003-Revert-window.c-various-minor-tweaks-small-speedup-4.patch +++ /dev/null @@ -1,155 +0,0 @@ -From af31e122db4308e2075d27c7bf138dc483da5d89 Mon Sep 17 00:00:00 2001 -From: Leigh Scott -Date: Thu, 21 Nov 2019 14:05:01 +0000 -Subject: [PATCH 3/3] Revert "window.c: various minor tweaks, small speedup - (#491)" - -This reverts commit 89805c059609f2cd48f60148896c057428362cb6. ---- - src/core/window.c | 46 ++++++++++++++++++++++------------------------ - 1 file changed, 22 insertions(+), 24 deletions(-) - -diff --git a/src/core/window.c b/src/core/window.c -index ffd044c..85b8731 100644 ---- a/src/core/window.c -+++ b/src/core/window.c -@@ -718,11 +718,10 @@ client_window_should_be_mapped (MetaWindow *window) - static void - sync_client_window_mapped (MetaWindow *window) - { -- gboolean should_be_mapped; -+ gboolean should_be_mapped = client_window_should_be_mapped (window); - - g_return_if_fail (!window->override_redirect); - -- should_be_mapped = client_window_should_be_mapped (window); - if (window->mapped == should_be_mapped) - return; - -@@ -1741,11 +1740,11 @@ static gboolean - detach_foreach_func (MetaWindow *window, - void *data) - { -+ GList **children = data; -+ MetaWindow *parent; -+ - if (window->attached) - { -- GList **children = data; -- MetaWindow *parent; -- - /* Only return the immediate children of the window being unmanaged */ - parent = meta_window_get_transient_for (window); - if (parent->unmanaging) -@@ -2620,11 +2619,12 @@ meta_window_flush_calc_showing (MetaWindow *window) - LOCAL_SYMBOL void - meta_window_queue (MetaWindow *window, guint queuebits) - { -+ guint queuenum; - - /* Easier to debug by checking here rather than in the idle */ - g_return_if_fail (!window->override_redirect || (queuebits & META_QUEUE_MOVE_RESIZE) == 0); - -- for (guint queuenum=0; queuenumgrab_anchor_root_x; - dy = y - display->grab_anchor_root_y; - -+ new_x = display->grab_anchor_window_pos.x + dx; -+ new_y = display->grab_anchor_window_pos.y + dy; -+ - meta_verbose ("x,y = %d,%d anchor ptr %d,%d anchor pos %d,%d dx,dy %d,%d\n", - x, y, - display->grab_anchor_root_x, -@@ -9718,13 +9721,6 @@ update_resize (MetaWindow *window, - dx = x - window->display->grab_anchor_root_x; - dy = y - window->display->grab_anchor_root_y; - -- /* Don't bother doing anything if no move has been specified. (This -- * happens often, even in keyboard resizing, due to the warping of the -- * pointer. -- */ -- if (dx == 0 && dy == 0) -- return; -- - /* Attached modal dialogs are special in that size - * changes apply to both sides, so that the dialog - * remains centered to the parent. -@@ -9738,6 +9734,13 @@ update_resize (MetaWindow *window, - new_w = window->display->grab_anchor_window_pos.width; - new_h = window->display->grab_anchor_window_pos.height; - -+ /* Don't bother doing anything if no move has been specified. (This -+ * happens often, even in keyboard resizing, due to the warping of the -+ * pointer. -+ */ -+ if (dx == 0 && dy == 0) -+ return; -+ - if (window->display->grab_op == META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN) - { - if (window->tile_mode == META_TILE_NONE) -@@ -11042,6 +11045,7 @@ ensure_mru_position_after (MetaWindow *window, - GList* after_this_one_position; - - active_mru_list = window->screen->active_workspace->mru_list; -+ window_position = g_list_find (active_mru_list, window); - after_this_one_position = g_list_find (active_mru_list, after_this_one); - - /* after_this_one_position is NULL when we switch workspaces, but in -@@ -11051,7 +11055,6 @@ ensure_mru_position_after (MetaWindow *window, - if (after_this_one_position == NULL) - return; - -- window_position = g_list_find (active_mru_list, window); - if (g_list_length (window_position) > g_list_length (after_this_one_position)) - { - window->screen->active_workspace->mru_list = -@@ -11201,20 +11204,16 @@ meta_window_get_stable_sequence (MetaWindow *window) - void - meta_window_set_demands_attention (MetaWindow *window) - { -- -- GList *stack; - MetaRectangle candidate_rect, other_rect; -+ GList *stack = window->screen->stack->sorted; - MetaWindow *other_window; -- gboolean obscured; -- MetaWorkspace *workspace; -+ gboolean obscured = FALSE; -+ -+ MetaWorkspace *workspace = window->screen->active_workspace; - - if (window->wm_state_demands_attention) - return; - -- obscured = FALSE; -- stack = window->screen->stack->sorted; -- workspace = window->screen->active_workspace; -- - if (workspace!=window->workspace) - { - /* windows on other workspaces are necessarily obscured */ -@@ -11972,14 +11971,13 @@ meta_window_compute_tile_match (MetaWindow *window) - { - MetaWindow *match; - MetaStack *stack; -- MetaTileMode match_tile_mode; -+ MetaTileMode match_tile_mode = META_TILE_NONE; - - window->tile_match = NULL; - - if (window->shaded || window->minimized) - return; - -- match_tile_mode = META_TILE_NONE; - if (META_WINDOW_TILED_LEFT (window)) - match_tile_mode = META_TILE_RIGHT; - else if (META_WINDOW_TILED_RIGHT (window)) --- -2.23.0 - diff --git a/Fix_shadows.patch b/Fix_shadows.patch new file mode 100644 index 0000000..f3f64e0 --- /dev/null +++ b/Fix_shadows.patch @@ -0,0 +1,42 @@ +From a5dbfacc18f878629d08ef3a02c418aed4b5119e Mon Sep 17 00:00:00 2001 +From: Clement Lefebvre +Date: Thu, 21 Nov 2019 17:32:04 +0000 +Subject: [PATCH] meta-shadow-factory: Fix terminal shadows + +The regression was introduced in https://github.com/linuxmint/muffin/commit/66efde884efce35afd433efbda966774a65c9d85 + +The rectangle array wasn't being filled up properly. +--- + src/compositor/meta-shadow-factory.c | 19 +++++++++---------- + 1 file changed, 9 insertions(+), 10 deletions(-) + +diff --git a/src/compositor/meta-shadow-factory.c b/src/compositor/meta-shadow-factory.c +index ac963ef3..f8139e64 100644 +--- a/src/compositor/meta-shadow-factory.c ++++ b/src/compositor/meta-shadow-factory.c +@@ -353,16 +353,15 @@ meta_shadow_paint (MetaShadow *shadow, + src_y2 = (src_y[j] * (dest_rect.y + dest_rect.height - (rect.y + rect.height)) + + src_y[j + 1] * (rect.y + rect.height - dest_rect.y)) / dest_rect.height; + +- pos = k*4; +- rects[pos++] = rect.x; +- rects[pos++] = rect.y; +- rects[pos++] = rect.x + rect.width; +- rects[pos++] = rect.y + rect.height; +- +- rects[pos++] = src_x1; +- rects[pos++] = src_y1; +- rects[pos++] = src_x2; +- rects[pos] = src_y2; ++ pos = k*8; ++ rects[pos] = rect.x; ++ rects[pos+1] = rect.y; ++ rects[pos+2] = rect.x + rect.width; ++ rects[pos+3] = rect.y + rect.height; ++ rects[pos+4] = src_x1; ++ rects[pos+5] = src_y1; ++ rects[pos+6] = src_x2; ++ rects[pos+7] = src_y2; + } + + cogl_framebuffer_draw_textured_rectangles (framebuffer, diff --git a/Fix_window_move.patch b/Fix_window_move.patch new file mode 100644 index 0000000..228556e --- /dev/null +++ b/Fix_window_move.patch @@ -0,0 +1,26 @@ +From 7f96dfca86af8a1f3acf50bd7cc56e59ad20bf86 Mon Sep 17 00:00:00 2001 +From: Clement Lefebvre +Date: Thu, 21 Nov 2019 17:46:13 +0000 +Subject: [PATCH] window.c: Fix regression on window move + +In https://github.com/linuxmint/muffin/commit/89805c059609f2cd48f60148896c057428362cb6 +it looks like two lines were removed by mistake, making it impossible to +move windows. +--- + src/core/window.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/core/window.c b/src/core/window.c +index ffd044c9..8ee0ed67 100644 +--- a/src/core/window.c ++++ b/src/core/window.c +@@ -9301,6 +9301,9 @@ update_move (MetaWindow *window, + dx = x - display->grab_anchor_root_x; + dy = y - display->grab_anchor_root_y; + ++ new_x = display->grab_anchor_window_pos.x + dx; ++ new_y = display->grab_anchor_window_pos.y + dy; ++ + meta_verbose ("x,y = %d,%d anchor ptr %d,%d anchor pos %d,%d dx,dy %d,%d\n", + x, y, + display->grab_anchor_root_x, diff --git a/muffin.spec b/muffin.spec index 52abdb1..7f3c9af 100644 --- a/muffin.spec +++ b/muffin.spec @@ -1,6 +1,6 @@ Name: muffin Version: 4.4.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Window and compositing manager based on Clutter License: GPLv2+ @@ -8,8 +8,8 @@ URL: https://github.com/linuxmint/%{name} Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Source1: muffin-adwaita.txt Patch0: 0001-fix-warnings-when-compiling.patch -Patch1: 0002-Revert-meta-shadow-factory-remove-some-deprecated-co.patch -Patch2: 0003-Revert-window.c-various-minor-tweaks-small-speedup-4.patch +Patch1: %{url}/pull/540.patch#/Fix_shadows.patch +Patch2: %{url}/pull/541.patch#/Fix_window_move.patch BuildRequires: desktop-file-utils BuildRequires: pkgconfig(gl) @@ -121,6 +121,9 @@ desktop-file-install --delete-original \ %{_mandir}/man1/muffin-* %changelog +* Thu Nov 21 2019 Leigh Scott - 4.4.0-4 +- Add upstream fixes for reverted commits + * Thu Nov 21 2019 Leigh Scott - 4.4.0-3 - Revert another bad commit