summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-02-27 23:11:08 -0500
committerDana Jansens <danakj@orodu.net>2008-02-27 23:11:08 -0500
commitdbbbbb7d48a03910554ab933ef71eb0e10f7a8e7 (patch)
tree5b518762454d3db0344141ea19ef6d3de97d8151 /openbox/client.c
parent573bbb08a63d2f1c1cb873a0746613cfb6fdb560 (diff)
When showing a window's title in the kill prompt, if it doesn't have a title use its parent's (same way the focus cycle popup does)
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/openbox/client.c b/openbox/client.c
index 20a4dffc..39a54820 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -3410,7 +3410,14 @@ static void client_prompt_kill(ObClient *self)
{ 0, OB_KILL_RESULT_YES }
};
gchar *m;
- const gchar *y;
+ const gchar *y, *title;
+
+ title = self->original_title;
+ if (title[0] == '\0') {
+ /* empty string, so use its parent */
+ ObClient *p = client_search_top_direct_parent(self);
+ if (p) title = p->original_title;
+ }
if (client_on_localhost(self)) {
const gchar *sig;
@@ -3422,13 +3429,13 @@ static void client_prompt_kill(ObClient *self)
m = g_strdup_printf
(_("The window \"%s\" does not seem to be responding. Do you want to force it to exit by sending the %s signal?"),
- self->original_title, sig);
+ title, sig);
y = _("End Process");
}
else {
m = g_strdup_printf
(_("The window \"%s\" does not seem to be responding. Do you want to disconnect it from the X server?"),
- self->original_title);
+ title);
y = _("Disconnect");
}
/* set the dialog buttons' text */