talons

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

commit 681532e4c5ece8ee0229a030770979b3e4f81871
parent 25bab9dcc94a2d3bd576ddff28ebc045581f2fb4
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Tue, 29 Nov 2016 19:23:14 +0100

Fix closing of description window using WM controls.

Closes bug #3740.

Diffstat:
Msrc/gtk/description_window.c | 10+++-------
1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/gtk/description_window.c b/src/gtk/description_window.c @@ -61,11 +61,7 @@ void description_window_create(DescriptionWindow *dwindow) gtk_window_set_destroy_with_parent(GTK_WINDOW(dwindow->window), TRUE); gtk_widget_show(dwindow->window); - /* in case the description window is closed using the WM's [X] button */ - g_signal_connect(G_OBJECT(dwindow->window), "destroy", - G_CALLBACK(gtk_widget_destroyed), &dwindow->window); - - } else g_print("windows exist\n"); + } else g_print("window exists\n"); } static void description_create(DescriptionWindow * dwindow) @@ -183,7 +179,7 @@ static void description_create(DescriptionWindow * dwindow) G_CALLBACK(description_window_focus_in_event), NULL); g_signal_connect(G_OBJECT(dwindow->window), "focus_out_event", G_CALLBACK(description_window_focus_out_event), NULL); - g_signal_connect(G_OBJECT(dwindow->window), "delete_event", + g_signal_connect(G_OBJECT(dwindow->window), "destroy", G_CALLBACK(description_window_destroy), dwindow); if(dwindow->parent) @@ -226,7 +222,7 @@ static gboolean description_window_focus_out_event (GtkWidget *widget, static void description_window_destroy (GtkWidget *widget, gpointer data) { DescriptionWindow *dwindow = (DescriptionWindow *) data; - + if(dwindow->window) { gtk_widget_hide(dwindow->window); gtk_widget_destroy(dwindow->window);