mate-panel: drop patches for earlier release.

This commit is contained in:
Luis Guzmán 2024-06-18 23:32:55 +00:00
parent 84d7c43496
commit fb7639a549
5 changed files with 3 additions and 133 deletions

View file

@ -1,39 +0,0 @@
From 7eed6c94204de780e7248fa711da03f72f900080 Mon Sep 17 00:00:00 2001
From: rbuj <robert.buj@gmail.com>
Date: Wed, 26 Jan 2022 15:09:45 +0100
Subject: [PATCH] wncklet: do not exceed workspace number when setting n_rows
---
applets/wncklet/workspace-switcher.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c
index a58abce21..f908ffe1c 100644
--- a/applets/wncklet/workspace-switcher.c
+++ b/applets/wncklet/workspace-switcher.c
@@ -490,11 +490,12 @@ static const GtkActionEntry pager_menu_actions[] = {
static void num_rows_changed(GSettings* settings, gchar* key, PagerData* pager)
{
- int n_rows = DEFAULT_ROWS;
+ int n_rows;
- n_rows = g_settings_get_int (settings, key);
-
- n_rows = CLAMP(n_rows, 1, MAX_REASONABLE_ROWS);
+ n_rows = CLAMP (g_settings_get_int (settings, key),
+ 1,
+ MIN (wnck_screen_get_workspace_count (pager->screen),
+ MAX_REASONABLE_ROWS));
pager->n_rows = n_rows;
pager_update(pager);
@@ -823,6 +824,8 @@ on_num_workspaces_value_changed (GtkSpinButton *button,
{
int workspace_count = gtk_spin_button_get_value_as_int (button);
wnck_screen_change_workspace_count(pager->screen, workspace_count);
+ if (workspace_count < pager->n_rows)
+ g_settings_set_int (pager->settings, "num-rows", workspace_count);
}
#endif /* HAVE_X11 */
}

View file

@ -1,37 +0,0 @@
From 7acb97b9b473556dd3199308fd1dcdc31a122d63 Mon Sep 17 00:00:00 2001
From: Colomban Wendling <cwendling@hypra.fr>
Date: Tue, 26 Apr 2022 11:44:47 +0200
Subject: [PATCH] wncklet: Fix crash thumbnailing dying or otherwise
inaccessible windows
Fixes https://github.com/mate-desktop/mate-desktop/issues/478
---
applets/wncklet/window-list.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index 45ed78f48..9c3ca6ff5 100644
--- a/applets/wncklet/window-list.c
+++ b/applets/wncklet/window-list.c
@@ -288,6 +288,8 @@ preview_window_thumbnail (WnckWindow *wnck_window,
*thumbnail_width = (int) ((double) width * ratio);
}
+ gdk_x11_display_error_trap_push (gdk_window_get_display (window));
+
thumbnail = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
*thumbnail_width,
*thumbnail_height);
@@ -298,6 +300,12 @@ preview_window_thumbnail (WnckWindow *wnck_window,
cairo_paint (cr);
cairo_destroy (cr);
+ if (gdk_x11_display_error_trap_pop (gdk_window_get_display (window)))
+ {
+ cairo_surface_destroy (thumbnail);
+ thumbnail = NULL;
+ }
+
g_object_unref (window);
return thumbnail;

View file

@ -1,30 +0,0 @@
From f958e06e6671c7cc3214d44c26bf51032e2f871b Mon Sep 17 00:00:00 2001
From: Colomban Wendling <cwendling@hypra.fr>
Date: Tue, 28 Jun 2022 11:23:01 +0200
Subject: [PATCH] clock: Fix memory leak
---
applets/clock/clock.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 1b3480fe6..3c7d1fde5 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -373,7 +373,7 @@ calculate_minimum_height (GtkWidget *widget,
{
GtkStateFlags state;
GtkStyleContext *style_context;
- const PangoFontDescription *font_desc;
+ PangoFontDescription *font_desc;
GtkBorder padding;
PangoContext *pango_context;
PangoFontMetrics *metrics;
@@ -394,6 +394,7 @@ calculate_minimum_height (GtkWidget *widget,
descent = pango_font_metrics_get_descent (metrics);
pango_font_metrics_unref (metrics);
+ pango_font_description_free (font_desc);
gtk_style_context_get_padding (style_context, state, &padding);

View file

@ -1,25 +0,0 @@
From e1bfb5b674c31e81465fc8307b28abc22260ccd6 Mon Sep 17 00:00:00 2001
From: Colomban Wendling <cwendling@hypra.fr>
Date: Tue, 28 Jun 2022 11:25:05 +0200
Subject: [PATCH] panel-applet: Fix leak in no-background code path
---
libmate-panel-applet/mate-panel-applet.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c
index c08e5cc20..38af2c388 100644
--- a/libmate-panel-applet/mate-panel-applet.c
+++ b/libmate-panel-applet/mate-panel-applet.c
@@ -1625,8 +1625,9 @@ mate_panel_applet_change_background(MatePanelApplet *applet,
switch (type) {
case PANEL_NO_BACKGROUND:
if (priv->out_of_process){
- pattern = cairo_pattern_create_rgba (0,0,0,0); /* Using NULL here breaks transparent */
- gdk_window_set_background_pattern(window,pattern); /* backgrounds set by GTK theme */
+ cairo_pattern_t *transparent = cairo_pattern_create_rgba (0, 0, 0, 0); /* Using NULL here breaks transparent */
+ gdk_window_set_background_pattern (window, transparent); /* backgrounds set by GTK theme */
+ cairo_pattern_destroy (transparent);
}
break;
case PANEL_COLOR_BACKGROUND:

View file

@ -1,5 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2024 Luis Guzmán <ark@switnet.org>
# Copyright (C) 2016-2020 Ruben Rodriguez <ruben@trisquel.info>
# Copyright (C) 2017 Mason Hock <mason@masonhock.com>
#
@ -125,10 +126,10 @@ EOF
sed -i "/<key name=\"show-window-thumbnails\"/,/<summary>/s|true|false|" \
applets/wncklet/org.mate.panel.applet.window-list-previews.gschema.xml.in
# Apply selected upstream fixes from mate-panel - 1.26.3
# Apply selected upstream fixes / patches
for i in $(find $DATA/ -name *.patch|sort)
do
patch --no-backup-if-mismatch -p1 < $i
patch_p1 $i
done
changelog "Changed default layout"