diff --git a/src/objects/window/actions/close.c b/src/objects/window/actions/close.c
index 2e81363..893fec6 100644
--- a/src/objects/window/actions/close.c
+++ b/src/objects/window/actions/close.c
@@ -29,9 +29,10 @@
#include "../private.h"
- void pw3270_window_close_activated(GSimpleAction G_GNUC_UNUSED(* action), GVariant G_GNUC_UNUSED(*parameter), gpointer application) {
+ void pw3270_window_close_activated(GSimpleAction G_GNUC_UNUSED(* action), GVariant G_GNUC_UNUSED(*parameter), gpointer window) {
- debug("%s",__FUNCTION__);
+ debug("%s(%p)",__FUNCTION__,window);
+ gtk_window_close(GTK_WINDOW(window));
}
diff --git a/src/objects/window/private.h b/src/objects/window/private.h
index 7e4b49e..101c34b 100644
--- a/src/objects/window/private.h
+++ b/src/objects/window/private.h
@@ -85,7 +85,7 @@
// Terminal actions.
GAction * pw3270_model_number_action_new(GtkWidget *terminal);
- G_GNUC_INTERNAL void pw3270_window_open_activated(GSimpleAction * action, GVariant *parameter, gpointer application);
- G_GNUC_INTERNAL void pw3270_window_close_activated(GSimpleAction * action, GVariant *parameter, gpointer application);
+ G_GNUC_INTERNAL void pw3270_window_open_activated(GSimpleAction * action, GVariant *parameter, gpointer window);
+ G_GNUC_INTERNAL void pw3270_window_close_activated(GSimpleAction * action, GVariant *parameter, gpointer window);
#endif // PRIVATE_H_INCLUDED
diff --git a/ui/window.xml b/ui/window.xml
index 5d6fbfb..be96846 100644
--- a/ui/window.xml
+++ b/ui/window.xml
@@ -185,6 +185,11 @@