X-Git-Url: http://git.openbox.org/?p=mikachu%2Fopenbox.git;a=blobdiff_plain;f=openbox%2Fclient.c;h=44b12870cc94f0da926d2760cccb823dabac1a62;hp=98d1035b9c6d0d0377e29f6191a35ca13dd3495e;hb=bb557f06a6828a95ee94c7579919dec1ee014484;hpb=527ecafab95e66a6f0cedd6967fe2c61dfe85101 diff --git a/openbox/client.c b/openbox/client.c index 98d1035..44b1287 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -3400,12 +3400,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; @@ -3456,7 +3464,9 @@ static void client_prompt_kill(ObClient *self) 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); }