Package: gapless
Version: 4.6-1
Severity: normal
Tags: patch upstream

Hi,
gapless uses a bit of an arcane way to show the toplevel which
makes it fail to send the proper startup-id. This causes launch
splash timeouts on mobile making it seem that the app takes
longer to start as it actually does.

A patch is attached and upstream at

https://gitlab.gnome.org/neithern/g4music/-/merge_requests/55

Cheers,
 -- Guido


-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 
'testing-debug'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 6.17.13+deb14-amd64 (SMP w/22 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gapless depends on:
ii  dconf-gsettings-backend [gsettings-backend]  0.49.0-4
ii  libadwaita-1-0                               1.8.3-1
ii  libc6                                        2.42-7
ii  libgdk-pixbuf-2.0-0                          2.44.4+dfsg-1
ii  libglib2.0-0t64                              2.86.3-4
ii  libgraphene-1.0-0                            1.10.8-5
ii  libgstreamer-plugins-base1.0-0               1.26.10-1
ii  libgstreamer1.0-0                            1.26.10-1
ii  libgtk-4-1                                   4.20.3+ds-3
ii  libpango-1.0-0                               1.56.4-1

gapless recommends no packages.

gapless suggests no packages.

-- no debconf information
>From 919efa87498ed1281abf1144f0c762c432b1b02f Mon Sep 17 00:00:00 2001
Message-ID: <919efa87498ed1281abf1144f0c762c432b1b02f.1769349484.git....@sigxcpu.org>
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <[email protected]>
Date: Wed, 7 Jan 2026 17:47:47 +0100
Subject: [PATCH] application: Present window from activate

---
 ...ication-Present-window-from-activate.patch | 50 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 51 insertions(+)
 create mode 100644 debian/patches/application-Present-window-from-activate.patch
 create mode 100644 debian/patches/series

diff --git a/debian/patches/application-Present-window-from-activate.patch b/debian/patches/application-Present-window-from-activate.patch
new file mode 100644
index 0000000..9ff543c
--- /dev/null
+++ b/debian/patches/application-Present-window-from-activate.patch
@@ -0,0 +1,50 @@
+From: =?utf-8?q?Guido_G=C3=BCnther?= <[email protected]>
+Date: Tue, 6 Jan 2026 17:55:48 +0100
+Subject: application: Present window from activate
+
+If the window is spawned from open the activation token is 0 and thus
+rejected from the compositor. This leads e.g. to the launch splash in
+Phosh timing out and making gapless look slow to start up.
+
+Creating the window from activate fixes this.
+---
+ src/application.vala | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/src/application.vala b/src/application.vala
+index eaf89aa..4b5f14f 100644
+--- a/src/application.vala
++++ b/src/application.vala
+@@ -20,6 +20,7 @@ namespace G4 {
+         private uint _sort_mode = SortMode.TITLE;
+         private bool _store_external_changed = false;
+         private Thumbnailer _thumbnailer = new Thumbnailer ();
++        private bool inited = false;
+ 
+         public signal void index_changed (int index, uint size);
+         public signal void music_changed (Music? music);
+@@ -82,16 +83,20 @@ namespace G4 {
+             base.activate ();
+ 
+             var window = Window.get_default ();
+-            if (window != null) {
+-                ((!)window).present ();
+-            } else {
++            if (window == null) {
++	            window = new Window (this);
++            }
++            ((!)window).present();
++
++            if (!inited) {
+                 open ({}, "");
+             }
+         }
+ 
+         public override void open (File[] files, string hint) {
+             var window = Window.get_default ();
+-            var initial = window == null;
++            var initial = !inited;
++            inited = true;
+             (window ?? new Window (this))?.present ();
+ 
+             if (initial && _current_music == null) {
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9e42a75
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+application-Present-window-from-activate.patch
-- 
2.51.0

Reply via email to