summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-03-02 17:23:23 -0500
committerDana Jansens <danakj@orodu.net>2008-03-02 17:23:23 -0500
commit7fb107cd37a09787c5cfa590688944b3bcb2bab8 (patch)
treebdd5bbf3eb5d4594dc9ae5b90bf553f14ee0946d /openbox/client.c
parentac255432b46617fe01fd40fd02fdea878893ce3c (diff)
parentf542c5143ac115937c5ee8f3a229e557383cd180 (diff)
Merge branch 'backport' into work
Conflicts: openbox/actions/execute.c openbox/event.c openbox/openbox.c openbox/openbox.h
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/openbox/client.c b/openbox/client.c
index b57d6169..e9443d49 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -3339,12 +3339,20 @@ void client_close(ObClient *self)
#define OB_KILL_RESULT_NO 0
#define OB_KILL_RESULT_YES 1
-static void client_kill_requested(ObPrompt *p, gint result, gpointer data)
+static gboolean client_kill_requested(ObPrompt *p, gint result, gpointer data)
{
ObClient *self = data;
if (result == OB_KILL_RESULT_YES)
client_kill(self);
+ return TRUE; /* call the cleanup func */
+}
+
+static void client_kill_cleanup(ObPrompt *p, gpointer data)
+{
+ ObClient *self = data;
+
+ g_assert(p == self->kill_prompt);
prompt_unref(self->kill_prompt);
self->kill_prompt = NULL;
@@ -3391,11 +3399,13 @@ static void client_prompt_kill(ObClient *self)
answers[0].text = _("Cancel"); /* "no" */
answers[1].text = y; /* "yes" */
- self->kill_prompt = prompt_new(m, answers,
+ self->kill_prompt = prompt_new(m, NULL, answers,
sizeof(answers)/sizeof(answers[0]),
OB_KILL_RESULT_NO, /* default = no */
OB_KILL_RESULT_NO, /* cancel = no */
- client_kill_requested, self);
+ client_kill_requested,
+ client_kill_cleanup,
+ self);
g_free(m);
}