talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 7c1bb13b902e8974b364a6e92d88e48c3a2fdcd0
parent 549a885ee1c2030c75a6e55b386ef744a07940fb
Author: Colin Leroy <colin@colino.net>
Date:   Wed, 28 May 2014 20:22:03 +0200

Fix the race fix, now preventing the compose window to be closed.

Diffstat:
Msrc/compose.c | 12+++---------
1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/compose.c b/src/compose.c @@ -9782,7 +9782,7 @@ gboolean compose_draft (gpointer data, guint action) debug_print("couldn't lock mutex, probably sending\n"); return FALSE; } - + lock = TRUE; tmp = g_strdup_printf("%s%cdraft.%p", get_tmp_dir(), @@ -11563,18 +11563,12 @@ gboolean compose_close(Compose *compose) g_timeout_add (500, (GSourceFunc) compose_close, compose); } - return FALSE; + return TRUE; } - if (compose->close_timeout_tag) { - /* let the close be done by the deferred callback */ - g_mutex_unlock(compose->mutex); - return FALSE; - } - if (compose->draft_timeout_tag >= 0) { g_source_remove(compose->draft_timeout_tag); - compose->draft_timeout_tag = COMPOSE_DRAFT_TIMEOUT_UNSET; + compose->draft_timeout_tag = COMPOSE_DRAFT_TIMEOUT_FORBIDDEN; } gtkut_widget_get_uposition(compose->window, &x, &y);