Subject: [PATCH] gnu: icecat-minimal: Fix WM Class.
From: Clément Lassieur <[email-masked]>
To: [email-masked]
Cc: Clément Lassieur <[email-masked]>
Date: Wed, 20 Dec 2023 17:04:39 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/gnuzilla.scm (icecat-minimal)[arguments]: Set the
MOZ_APP_REMOTINGNAME environment variable and replace "Navigator" with
"Icecat" in icecat.desktop.

The WM Class should be "Navigator, Icecat" instead of "Navigator,
icecat-default".  StartupWMClass in icecat.desktop should be "Icecat" instead
of "Navigator" so that other browsers (they often have the "Navigator" class)
won't be associated with Icecat.

Change-Id: I57bec957938c56e8acf9cd5c955e57dbad081678
---
 gnu/packages/gnuzilla.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 9dfc61a7d7a6..b268ae8b7c6d 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -1034,6 +1034,9 @@ (define-public icecat-minimal
                 (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE" "system")
                 (setenv "MOZ_BUILD_DATE" #$%icecat-build-id) ; avoid timestamp
 
+                ;; WM_CLASS (default is "$MOZ_APP_NAME-$MOZ_UPDATE_CHANNEL").
+                (setenv "MOZ_APP_REMOTINGNAME" "Icecat")
+
                 ;; XXX TODO: Fix this to work on systems other than x86_64-linux.
                 (setenv "GUIX_PYTHONPATH"
                         (string-append (getcwd)
@@ -1120,7 +1123,7 @@ (define-public icecat-minimal
                   (("NewWindow")        "new-window")
                   (("NewPrivateWindow") "new-private-window")
                   (("StartupNotify=true")
-                   "StartupNotify=true\nStartupWMClass=Navigator"))
+                   "StartupNotify=true\nStartupWMClass=Icecat"))
                 (install-file desktop-file applications))))
           (add-after 'install-desktop-entry 'install-icons
             (lambda _

base-commit: bb3ab24a296ffa5273b2e82a02ed057e90c095f3
prerequisite-patch-id: 51e2c2aaf5262d0d9001b0b5c37836060291f55d
prerequisite-patch-id: ea15ff59ebfaff0fce3c9a1d42a3c345f8618aab
prerequisite-patch-id: 459d954ba63d5c0c15f8b519aa5aef331f218cc6
prerequisite-patch-id: cc5c8cd318ced4bb10d30f2e00b41b1be1309226
prerequisite-patch-id: 32045c6f50d674987ad6be5b15b8f4f010123c37
-- 
2.41.0