Set the GTK program name/class to the desktop ID before initialization to ensure window-to-desktop-entry mapping uses the correct identifier.

Updated the desktop file’s StartupWMClass to match the desktop ID for consistent icon matching.
This commit is contained in:
2026-02-05 02:05:48 -07:00
parent eb46631a7d
commit 0dd25cb631
2 changed files with 6 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ Terminal=false
Type=Application
Categories=GTK;Network;IRCClient;
StartupNotify=true
StartupWMClass=Zoitechat
StartupWMClass=net.zoite.Zoitechat
X-GNOME-UsesNotifications=true
MimeType=x-scheme-handler/irc;x-scheme-handler/ircs;application/x-zoitechat-theme;application/x-hexchat-theme;
Actions=SafeMode;

View File

@@ -123,6 +123,7 @@ fe_args (int argc, char *argv[])
GError *error = NULL;
GOptionContext *context;
char *buffer;
const char *desktop_id = "net.zoite.Zoitechat";
#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
@@ -241,6 +242,10 @@ fe_args (int argc, char *argv[])
}
#endif
g_set_prgname (desktop_id);
#ifndef WIN32
gdk_set_program_class (desktop_id);
#endif
gtk_init (&argc, &argv);
#ifdef HAVE_GTK_MAC