]> git.armaanb.net Git - chorizo.git/commitdiff
Set WM_CLASS
authorPeter Hofmann <scm@uninformativ.de>
Sun, 15 Jun 2014 09:07:57 +0000 (11:07 +0200)
committerPeter Hofmann <scm@uninformativ.de>
Sun, 15 Jun 2014 09:07:57 +0000 (11:07 +0200)
browser.c

index 1638f5f19f93a4a54962ff82143e6807502aa545..bc0093b4e03eef5cac74580239c9f4b71e577d56 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -159,6 +159,8 @@ client_destroy(GtkWidget *obj, gpointer data)
 void
 client_new(const gchar *uri)
 {
+       gchar *capitalized_name = NULL;
+
        if (cooperative_instances && !cooperative_alone)
        {
                write(cooperative_pipe_fp, uri, strlen(uri));
@@ -187,8 +189,15 @@ client_new(const gchar *uri)
        }
 
        if (c->win == NULL)
+       {
                c->win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 
+               capitalized_name = g_strdup(__NAME__);
+               capitalized_name[0] = g_ascii_toupper(capitalized_name[0]);
+               gtk_window_set_wmclass(GTK_WINDOW(c->win), __NAME__, capitalized_name);
+               g_free(capitalized_name);
+       }
+
        /* When using Gtk2, it only shows a white area when run in suckless'
         * tabbed. It appears we need to set a default window size for this
         * to work. This is not needed when using Gtk3. */
@@ -584,7 +593,7 @@ tabbed_launch(void)
        GIOChannel *tabbed_stdout_channel;
        GError *err = NULL;
        gchar *output = NULL;
-       char *argv[] = { "tabbed", "-c", "-d", NULL };
+       char *argv[] = { "tabbed", "-c", "-d", "-n", __NAME__, NULL };
        Window plug_into;
 
        if (!g_spawn_async_with_pipes(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL,