[gnome-terminal] server: Set WM class to the application ID



commit 6c91fa92151cc1306ff2ec8edcaacca0506d3ecc
Author: Christian Persch <chpe gnome org>
Date:   Sun Feb 22 19:48:52 2015 +0100

    server: Set WM class to the application ID
    
    Instead of always using "gnome-terminal" as WM class, use the application
    ID instead.  This way, different instances can be distinguished by the shell.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=685742

 src/terminal-app.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/terminal-app.c b/src/terminal-app.c
index 94fa35b..a0c13ac 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -326,8 +326,8 @@ terminal_app_startup (GApplication *application)
 
   G_APPLICATION_CLASS (terminal_app_parent_class)->startup (application);
 
-  /* Need to set the WM class (bug #685742) */
-  gdk_set_program_class("Gnome-terminal");
+  /* Set the WM class to the app ID (see bug #685742) */
+  gdk_set_program_class (g_application_get_application_id (application));
 
   g_action_map_add_action_entries (G_ACTION_MAP (application),
                                    app_menu_actions, G_N_ELEMENTS (app_menu_actions),


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