diff --git a/Xwt.Gtk/Xwt.GtkBackend/MessageService.cs b/Xwt.Gtk/Xwt.GtkBackend/MessageService.cs
index 6c95fa80..6a5558a0 100644
--- a/Xwt.Gtk/Xwt.GtkBackend/MessageService.cs
+++ b/Xwt.Gtk/Xwt.GtkBackend/MessageService.cs
@@ -72,7 +72,6 @@ namespace Xwt.GtkBackend
}
dialog.TransientFor = parent;
dialog.DestroyWithParent = true;
- PlaceDialog (dialog, parent);
return GtkWorkarounds.RunDialogWithNotification (dialog);
}
@@ -96,39 +95,5 @@ namespace Xwt.GtkBackend
return w;
return RootWindow;
}
-
- ///
- /// Positions a dialog relative to its parent on platforms where default placement is known to be poor.
- ///
- public static void PlaceDialog (Gtk.Window child, Gtk.Window parent)
- {
- //HACK: Mac GTK automatic window placement is broken
- if (Platform.IsMac) {
- if (parent == null) {
- parent = GetDefaultParent (child);
- }
- if (parent != null) {
- CenterWindow (child, parent);
- }
- }
- }
-
- /// Centers a window relative to its parent.
- static void CenterWindow (Gtk.Window child, Gtk.Window parent)
- {
- child.Child.Show ();
- int w, h, winw, winh, x, y, winx, winy;
- if (child.Visible)
- child.GetSize (out w, out h);
- else {
- w = child.DefaultSize.Width;
- h = child.DefaultSize.Height;
- }
- parent.GetSize (out winw, out winh);
- parent.GetPosition (out winx, out winy);
- x = Math.Max (0, (winw - w) /2) + winx;
- y = Math.Max (0, (winh - h) /2) + winy;
- child.Move (x, y);
- }
}
}