aboutsummaryrefslogtreecommitdiff
path: root/src/inputdialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/inputdialog.c')
-rw-r--r--src/inputdialog.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/inputdialog.c b/src/inputdialog.c
index c0eca91c..9fe0c6e6 100644
--- a/src/inputdialog.c
+++ b/src/inputdialog.c
@@ -87,6 +87,9 @@ static gboolean key_pressed (GtkWidget *widget,
gpointer data);
static void entry_activated (GtkEditable *editable);
static void combo_activated (GtkEditable *editable);
+static gint focus_out (GtkWidget *widget,
+ GdkEventFocus *event,
+ gpointer data);
gchar *input_dialog(const gchar *title, const gchar *message,
@@ -163,6 +166,8 @@ static void input_dialog_create(InputDialogType dialog_type)
G_CALLBACK(delete_event), NULL);
g_signal_connect(G_OBJECT(dialog), "key_press_event",
G_CALLBACK(key_pressed), NULL);
+ g_signal_connect(G_OBJECT(dialog), "focus_out_event",
+ G_CALLBACK(focus_out), NULL);
MANAGE_WINDOW_SIGNALS_CONNECT(dialog);
gtk_widget_realize(dialog);
@@ -324,3 +329,11 @@ static void combo_activated(GtkEditable *editable)
ack = TRUE;
fin = TRUE;
}
+
+static gint focus_out(GtkWidget *widget, GdkEventFocus *event, gpointer data)
+{
+#ifdef G_OS_WIN32
+ gtk_window_present(GTK_WINDOW(widget));
+#endif
+ return FALSE;
+}