diff options
author | Olivier Fourdan <fourdan.olivier@wanadoo.fr> | 2008-09-28 17:29:17 +0000 |
---|---|---|
committer | Olivier Fourdan <fourdan.olivier@wanadoo.fr> | 2008-09-28 17:29:17 +0000 |
commit | ca6df631fe8b30bf5ee66d07da63a46a449f92cb (patch) | |
tree | ecaee9452eb027e21c0ed6d78e97878ce4c89ab7 | |
parent | 87441632eb4d8d83bcc67176663ff433270173b8 (diff) | |
download | xfwm4-ca6df631fe8b30bf5ee66d07da63a46a449f92cb.tar.gz |
Fix name change broken by one of last commits
(Old svn revision: 27980)
-rw-r--r-- | src/client.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/src/client.c b/src/client.c index 8837fb9a5..8e83776a1 100644 --- a/src/client.c +++ b/src/client.c @@ -164,7 +164,7 @@ clientUpdateColormaps (Client * c) } static gchar* -clientCreateTitleName (Client * c) +clientCreateTitleName (Client * c, gchar *name, gchar *hostname) { ScreenInfo *screen_info; DisplayInfo *display_info; @@ -176,14 +176,14 @@ clientCreateTitleName (Client * c) screen_info = c->screen_info; display_info = screen_info->display_info; - if (strlen (c->hostname) && (display_info->hostname) && (g_strcasecmp (display_info->hostname, c->hostname))) + if (strlen (hostname) && (display_info->hostname) && (g_strcasecmp (display_info->hostname, hostname))) { /* TRANSLATORS: "(on %s)" is like "running on" the name of the other host */ - title = g_strdup_printf (_("%s (on %s)"), c->name, c->hostname); + title = g_strdup_printf (_("%s (on %s)"), name, hostname); } else { - title = g_strdup (c->name); + title = g_strdup (name); } return title; @@ -209,9 +209,19 @@ clientUpdateName (Client * c) getWindowHostname (display_info, c->window, &hostname); refresh = FALSE; + /* Update hostname too, as it's used when terminating a client */ + if (hostname) + { + if (c->hostname) + { + g_free (c->hostname); + } + c->hostname = hostname; + } + if (wm_name) { - name = clientCreateTitleName (c); + name = clientCreateTitleName (c, wm_name, hostname); g_free (wm_name); if (c->name) { @@ -225,21 +235,10 @@ clientUpdateName (Client * c) c->name = name; } - /* Update hostname too, as it's used when terminating a client */ - if (hostname) - { - if (c->hostname) - { - g_free (c->hostname); - } - c->hostname = hostname; - } - if (refresh) { frameQueueDraw (c, TRUE); } - } void |