diff options
Diffstat (limited to 'Xwt.Gtk/Xwt.GtkBackend/DialogBackend.cs')
-rw-r--r-- | Xwt.Gtk/Xwt.GtkBackend/DialogBackend.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Xwt.Gtk/Xwt.GtkBackend/DialogBackend.cs b/Xwt.Gtk/Xwt.GtkBackend/DialogBackend.cs index e84c47c9..ce3033d7 100644 --- a/Xwt.Gtk/Xwt.GtkBackend/DialogBackend.cs +++ b/Xwt.Gtk/Xwt.GtkBackend/DialogBackend.cs @@ -126,7 +126,16 @@ namespace Xwt.GtkBackend // GTK adds a border to the root widget, for some unknown reason ((Gtk.Container)Window.Child).BorderWidth = 0; var p = (WindowFrameBackend) parent; - MessageService.RunCustomDialog (Window, p != null ? p.Window : null); + + bool keepRunning = false; + do { + var res = MessageService.RunCustomDialog (Window, p != null ? p.Window : null); + if (res == (int) Gtk.ResponseType.DeleteEvent) { + ApplicationContext.InvokeUserCode(delegate { + keepRunning = EventSink.OnCloseRequested (); + }); + } + } while (keepRunning); } public void EndLoop () |