diff --git a/app/widgets/gimpfiledialog.c b/app/widgets/gimpfiledialog.c
index fd0c7c6..2feea42 100644
--- a/app/widgets/gimpfiledialog.c
+++ b/app/widgets/gimpfiledialog.c
@@ -20,6 +20,7 @@
 
 #include "config.h"
 
+#undef GSEAL_ENABLE
 #include <gegl.h>
 #include <gtk/gtk.h>
 
@@ -86,6 +87,8 @@ static void     gimp_file_dialog_dispose                 (GObject             *o
 
 static gboolean gimp_file_dialog_delete_event            (GtkWidget           *widget,
                                                           GdkEventAny         *event);
+static gboolean gimp_file_dialog_map_event               (GtkWidget           *widget,
+                                                          GdkEventAny         *event);
 static void     gimp_file_dialog_response                (GtkDialog           *dialog,
                                                           gint                 response_id);
 static GFile  * gimp_file_dialog_real_get_default_folder (GimpFileDialog      *dialog);
@@ -162,6 +165,7 @@ gimp_file_dialog_class_init (GimpFileDialogClass *klass)
   object_class->constructed  = gimp_file_dialog_constructed;
   object_class->dispose      = gimp_file_dialog_dispose;
 
+  widget_class->map_event    = gimp_file_dialog_map_event;
   widget_class->delete_event = gimp_file_dialog_delete_event;
 
   dialog_class->response     = gimp_file_dialog_response;
@@ -411,6 +415,22 @@ gimp_file_dialog_dispose (GObject *object)
 }
 
 static gboolean
+gimp_file_dialog_map_event (GtkWidget   *widget,
+                            GdkEventAny *event)
+{
+  GdkDisplay *display = gtk_widget_get_display (widget);
+
+  if (display->ignore_core_events)
+    {
+      display->ignore_core_events = 0;
+//      gtk_widget_hide (widget);
+  //    gtk_widget_show (widget);
+    }
+
+  return FALSE;
+}
+
+static gboolean
 gimp_file_dialog_delete_event (GtkWidget   *widget,
                                GdkEventAny *event)
 {
