public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Leigh Scott <leigh123linux@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/cinnamon] f45: Improve menu applet fix
Date: Sun, 23 Aug 2026 15:38:12 GMT [thread overview]
Message-ID: <178749949200.1.624494471882613100.rpms-cinnamon-99f7f1bf48b5@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/cinnamon
Branch : f45
Commit : 99f7f1bf48b516e23d0f130a3bcb6f4359f0e820
Author : Leigh Scott <leigh123linux@gmail.com>
Date : 2026-08-23T16:37:59+01:00
Stats : +120/-89 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/cinnamon/c/99f7f1bf48b516e23d0f130a3bcb6f4359f0e820?branch=f45
Log:
Improve menu applet fix
---
diff --git a/cinnamon.spec b/cinnamon.spec
index 1fcad48..e31f9aa 100644
--- a/cinnamon.spec
+++ b/cinnamon.spec
@@ -10,7 +10,7 @@
Name: cinnamon
Version: 6.7.5^unstable
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Window management and application launching for Cinnamon
License: GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND MIT
URL: https://github.com/linuxmint/%{name}
@@ -23,7 +23,7 @@ Patch0: set_wheel.patch
Patch1: default_panal_launcher.patch
Patch2: remove_crap_from_menu.patch
Patch3: set_menu_defaults.patch
-Patch4: glycin_fix.patch
+Patch4: %url/pull/13947.patch#/glycin_ratelimit.patch
ExcludeArch: %{ix86}
@@ -313,6 +313,9 @@ rm -rf %{buildroot}%{_mandir}/man1/cinnamon2d*
%{_datadir}/dbus-1/services/org.%{name}.CalendarServer.service
%changelog
+* Sun Aug 23 2026 Leigh Scott <leigh123linux@gmail.com> - 6.7.5^unstable-3
+- Improve menu applet fix
+
* Wed Aug 19 2026 Leigh Scott <leigh123linux@gmail.com> - 6.7.5^unstable-2
- Fix menu applet loading issue
diff --git a/glycin_fix.patch b/glycin_fix.patch
deleted file mode 100644
index 24ea3d1..0000000
--- a/glycin_fix.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-diff -uNrp a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
---- a/src/st/st-texture-cache.c 2026-08-15 11:45:56.000000000 +0100
-+++ b/src/st/st-texture-cache.c 2026-08-19 16:31:16.706128494 +0100
-@@ -674,6 +674,45 @@ out:
- texture_load_data_free (data);
- }
-
-+typedef struct {
-+ AsyncTextureLoadData *data;
-+ gboolean symbolic;
-+} IconThreadData;
-+
-+static gboolean
-+icon_thread_finish_idle (gpointer user_data)
-+{
-+ IconThreadData *itd = user_data;
-+ AsyncTextureLoadData *data = itd->data;
-+ GdkPixbuf *pixbuf = NULL;
-+
-+ if (itd->symbolic && data->colors) {
-+ GdkRGBA fg, success, warning, error;
-+ rgba_from_clutter (&fg, &data->colors->foreground);
-+ rgba_from_clutter (&success, &data->colors->success);
-+ rgba_from_clutter (&warning, &data->colors->warning);
-+ rgba_from_clutter (&error, &data->colors->error);
-+
-+ pixbuf = gtk_icon_info_load_symbolic (data->icon_info,
-+ &fg, &success,
-+ &warning, &error,
-+ NULL, NULL);
-+ } else {
-+ pixbuf = gtk_icon_info_load_icon (data->icon_info, NULL);
-+ }
-+
-+ finish_texture_load (data, pixbuf);
-+ g_clear_object (&pixbuf);
-+ g_free (itd);
-+ return G_SOURCE_REMOVE;
-+}
-+
-+static gpointer
-+icon_thread_func (gpointer user_data)
-+{
-+ g_idle_add (icon_thread_finish_idle, user_data);
-+ return NULL;
-+}
- static void
- on_symbolic_icon_loaded (GObject *source,
- GAsyncResult *result,
-@@ -720,31 +759,12 @@ load_texture_async (StTextureCache
- }
- else if (data->icon_info)
- {
-- StIconColors *colors = data->colors;
-- if (colors)
-- {
-- GdkRGBA foreground_color;
-- GdkRGBA success_color;
-- GdkRGBA warning_color;
-- GdkRGBA error_color;
--
-- rgba_from_clutter (&foreground_color, &colors->foreground);
-- rgba_from_clutter (&success_color, &colors->success);
-- rgba_from_clutter (&warning_color, &colors->warning);
-- rgba_from_clutter (&error_color, &colors->error);
--
-- gtk_icon_info_load_symbolic_async (data->icon_info,
-- &foreground_color, &success_color,
-- &warning_color, &error_color,
-- cache->priv->cancellable,
-- on_symbolic_icon_loaded, data);
-- }
-- else
-- {
-- gtk_icon_info_load_icon_async (data->icon_info,
-- cache->priv->cancellable,
-- on_icon_loaded, data);
-- }
-+ IconThreadData *itd = g_new0 (IconThreadData, 1);
-+ itd->data = data;
-+ itd->symbolic = (data->colors != NULL);
-+
-+ /* Use our own worker thread instead of the global GTask pool */
-+ g_thread_new ("cinnamon-icon-loader", icon_thread_func, itd);
- }
- else
- g_assert_not_reached ();
diff --git a/glycin_ratelimit.patch b/glycin_ratelimit.patch
new file mode 100644
index 0000000..2bd885a
--- /dev/null
+++ b/glycin_ratelimit.patch
@@ -0,0 +1,115 @@
+From 22f09997d5d372cfcdfc860fec45689b49880ebc Mon Sep 17 00:00:00 2001
+From: Leigh Scott <leigh123linux@gmail.com>
+Date: Sun, 23 Aug 2026 13:49:46 +0100
+Subject: [PATCH] st: Limit texture loading to 9 parallel operations
+
+---
+ src/st/st-texture-cache.c | 41 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 41 insertions(+)
+
+diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
+index d3f673741c..a1d939c7b9 100644
+--- a/src/st/st-texture-cache.c
++++ b/src/st/st-texture-cache.c
+@@ -35,6 +35,10 @@
+ #define CACHE_PREFIX_FILE "file:"
+ #define CACHE_PREFIX_FILE_FOR_CAIRO "file-for-cairo:"
+
++/* Arbitrary cap on concurrent texture loads in flight. See comment on
++ * loading_textures_counter in StTextureCachePrivate above. */
++#define MAX_PARALLEL_LOAD_TASKS 9
++
+ struct _StTextureCachePrivate
+ {
+ GtkIconTheme *icon_theme;
+@@ -56,11 +60,22 @@ struct _StTextureCachePrivate
+ GHashTable *image_type_table;
+
+ GCancellable *cancellable;
++
++ /* Number of textures currently loading, and requests deferred because
++ * MAX_PARALLEL_LOAD_TASKS was reached. Rate-limiting concurrent loads
++ * avoids starving GTask's default thread pool scheduler -- notably an
++ * issue now that most icon formats are loaded via glycin's sandboxed,
++ * per-call IPC round-trip rather than in-process, which is slow enough
++ * per call that submitting hundreds of requests at once (e.g. populating
++ * a large app menu) could leave many of them never completing. */
++ uint32_t loading_textures_counter;
++ GQueue *pending_tasks;
+ };
+
+ static void st_texture_cache_dispose (GObject *object);
+ static void st_texture_cache_finalize (GObject *object);
+ static void load_image_type_table (StTextureCache *cache);
++static void texture_load_data_free (gpointer p);
+
+ enum
+ {
+@@ -204,6 +219,8 @@ st_texture_cache_init (StTextureCache *self)
+
+ self->priv->cancellable = g_cancellable_new ();
+
++ self->priv->pending_tasks = g_queue_new ();
++
+ on_icon_theme_changed (settings, NULL, self);
+ }
+
+@@ -218,6 +235,12 @@ st_texture_cache_dispose (GObject *object)
+ g_clear_object (&self->priv->icon_theme);
+ g_clear_object (&self->priv->cancellable);
+
++ if (self->priv->pending_tasks)
++ {
++ g_queue_free_full (self->priv->pending_tasks, texture_load_data_free);
++ self->priv->pending_tasks = NULL;
++ }
++
+ g_clear_pointer (&self->priv->keyed_cache, g_hash_table_destroy);
+ g_clear_pointer (&self->priv->keyed_surface_cache, g_hash_table_destroy);
+ g_clear_pointer (&self->priv->used_scales, g_hash_table_destroy);
+@@ -371,6 +394,9 @@ texture_load_data_free (gpointer p)
+ g_slice_free (AsyncTextureLoadData, data);
+ }
+
++static void load_texture_async (StTextureCache *cache,
++ AsyncTextureLoadData *data);
++
+ /**
+ * on_image_size_prepared:
+ * @pixbuf_loader: #GdkPixbufLoader loading the image
+@@ -627,6 +653,9 @@ finish_texture_load (AsyncTextureLoadData *data,
+
+ cache = data->cache;
+
++ g_assert (cache->priv->loading_textures_counter > 0);
++ cache->priv->loading_textures_counter--;
++
+ g_hash_table_remove (cache->priv->outstanding_requests, data->key);
+
+ if (pixbuf == NULL)
+@@ -672,6 +701,10 @@ finish_texture_load (AsyncTextureLoadData *data,
+
+ out:
+ texture_load_data_free (data);
++
++ data = g_queue_pop_head (cache->priv->pending_tasks);
++ if (data)
++ load_texture_async (cache, data);
+ }
+
+ static void
+@@ -711,6 +744,14 @@ static void
+ load_texture_async (StTextureCache *cache,
+ AsyncTextureLoadData *data)
+ {
++ if (cache->priv->loading_textures_counter >= MAX_PARALLEL_LOAD_TASKS)
++ {
++ g_queue_push_tail (cache->priv->pending_tasks, data);
++ return;
++ }
++
++ cache->priv->loading_textures_counter++;
++
+ if (data->file)
+ {
+ GTask *task = g_task_new (cache, NULL, on_pixbuf_loaded, data);
reply other threads:[~2026-08-23 15:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178749949200.1.624494471882613100.rpms-cinnamon-99f7f1bf48b5@fedoraproject.org \
--to=leigh123linux@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox