diff options
author | Aaron Bockover <abock@microsoft.com> | 2019-10-10 18:59:18 +0300 |
---|---|---|
committer | Aaron Bockover <abock@microsoft.com> | 2019-10-10 19:39:14 +0300 |
commit | d7b7b6b6acf7c837af4f4c5b95b76e54f3f4d08f (patch) | |
tree | 95cbfd6dc54e932e5525ec5919c761b331cb53d9 /main/src/addins/MonoDevelop.TextEditor | |
parent | ec3a336ac1053361b27fc2df5f610873ed57fa95 (diff) |
GtkNSViewHost: make native view Disposal optional and off-by-default
1. I have theoretical issues with assuming the native guest control
should be forcefully Disposed via Gtk.Destroy due to this being
a GTK/NSView interop boundary - the GTK host shouldn't make
life-cycle assumptions about its native guest by default.
2. We do not want to break other users of the host. They _probably_
want the native-Dispose-on-GTK-Destroy behavior but they too should
double check and opt-in.
Diffstat (limited to 'main/src/addins/MonoDevelop.TextEditor')
-rw-r--r-- | main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Cocoa/CocoaTextViewContent.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Cocoa/CocoaTextViewContent.cs b/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Cocoa/CocoaTextViewContent.cs index 39afc1a5fb..c39069b68d 100644 --- a/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Cocoa/CocoaTextViewContent.cs +++ b/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor.Cocoa/CocoaTextViewContent.cs @@ -93,7 +93,10 @@ namespace MonoDevelop.TextEditor if (textViewHost == null) throw new ArgumentNullException (nameof (textViewHost)); - GtkView = new Gtk.GtkNSViewHost (textViewHost.HostControl); + GtkView = new Gtk.GtkNSViewHost ( + textViewHost.HostControl, + disposeViewOnGtkDestroy: true); + GtkView.Show (); } |