diff --git a/src/document.c b/src/document.c index 33532f89..aae11db7 100644 --- a/src/document.c +++ b/src/document.c @@ -3215,7 +3215,7 @@ static gboolean on_sci_key(GtkWidget *widget, GdkEventKey *event, gpointer data) static void enable_key_intercept(GeanyDocument *doc, GtkWidget *bar) { /* automatically focus editor again on bar close */ - g_signal_connect_object(bar, "unrealize", G_CALLBACK(gtk_widget_grab_focus), doc->editor->sci, + g_signal_connect_object(bar, "destroy", G_CALLBACK(gtk_widget_grab_focus), doc->editor->sci, G_CONNECT_SWAPPED); g_signal_connect_object(doc->editor->sci, "key-press-event", G_CALLBACK(on_sci_key), bar, 0); }