Package: free42-nologo
Version: 3.0.14+ds-1
Severity: normal
Tags: patch

Dear Maintainer,

When I run free42-nologo inside GNOME Shell, the icon and title of the
application are not properly set in the list of running applications (displayed
when pressing “Alt-Tab”). A generic icon is displayed instead and the title is
set to the name of the executable (either “free42dec” or “free42bin”).

The reason for this bug is that the application ID used when initializing GTK+
does not match the name of .desktop file.

I attach a patch that fixes this issue.

Note that I’m unsure about whether this patch should be forwarded upstream,
since .desktop files are Debian-specific, and upstream may not care about
freedesktop.org compliance.

Thanks for your work,

--
⢀⣴⠾⠻⢶⣦⠀  Sébastien Villemot
⣾⠁⢠⠒⠀⣿⡁  Debian Developer
⢿⡄⠘⠷⠚⠋⠀  https://sebastien.villemot.name
⠈⠳⣄⠀⠀⠀⠀  https://www.debian.org
--- a/gtk/shell_main.cc
+++ b/gtk/shell_main.cc
@@ -189,8 +189,10 @@ static void gif_writer(const char *text,
 
 #ifdef BCD_MATH
 #define TITLE "Free42 Decimal"
+#define APPID "com.thomasokken.Free42dec"
 #else
 #define TITLE "Free42 Binary"
+#define APPID "com.thomasokken.Free42bin"
 #endif
 
 static const char *mainWindowXml =
@@ -373,7 +375,7 @@ int main(int argc, char *argv[]) {
 
     GtkApplication *app;
     int status;
-    app = gtk_application_new("com.thomasokken.free42", 
G_APPLICATION_FLAGS_NONE);
+    app = gtk_application_new(APPID, G_APPLICATION_FLAGS_NONE);
     g_signal_connect(app, "activate", G_CALLBACK(activate), NULL);
     status = g_application_run(G_APPLICATION(app), 0, NULL);
     g_object_unref(app);

Reply via email to