[gnome-terminal/gnome-43] prefs: Use different wm class



commit d7f461df435394c5f818433fa2bfe14fdd14ebe2
Author: Christian Persch <chpe src gnome org>
Date:   Fri Sep 30 23:39:44 2022 +0200

    prefs: Use different wm class
    
    https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/7934
    (cherry picked from commit 4dc9dbe3a3e3d5effbd042a8f15dfd9f32e21adf)

 data/org.gnome.Terminal.Preferences.desktop.in | 2 +-
 src/terminal-app.cc                            | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/data/org.gnome.Terminal.Preferences.desktop.in b/data/org.gnome.Terminal.Preferences.desktop.in
index 5a57bdf7..1a9abfb1 100644
--- a/data/org.gnome.Terminal.Preferences.desktop.in
+++ b/data/org.gnome.Terminal.Preferences.desktop.in
@@ -9,6 +9,6 @@ Name=Preferences
 NoDisplay=true
 SingleMainWindow=true
 StartupNotify=true
-StartupWMClass=Gnome-terminal
+StartupWMClass=Gnome-terminal-preferences
 TryExec=gnome-terminal
 Type=Application
diff --git a/src/terminal-app.cc b/src/terminal-app.cc
index 59a4db15..f494b7d4 100644
--- a/src/terminal-app.cc
+++ b/src/terminal-app.cc
@@ -852,7 +852,13 @@ terminal_app_startup (GApplication *application)
   G_APPLICATION_CLASS (terminal_app_parent_class)->startup (application);
 
   /* Need to set the WM class (bug #685742) */
+#if defined(TERMINAL_SERVER)
   gdk_set_program_class("Gnome-terminal");
+#elif defined(TERMINAL_PREFERENCES)
+  gdk_set_program_class("Gnome-terminal-preferences");
+#else
+#error
+#endif
 
   app_load_css (application);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]