diff options
author | Lluis Sanchez Gual <lluis@xamarin.com> | 2015-04-20 19:07:51 +0300 |
---|---|---|
committer | Lluis Sanchez Gual <lluis@xamarin.com> | 2015-04-20 19:07:51 +0300 |
commit | 95408b1a41b31b645f3a8c3323ab7d3ca4bff26b (patch) | |
tree | f8f137cddcb9a40499d303be95722fd2c6081bce /main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs | |
parent | b70e4e04b4e41b8ec28d7e4b220b401ecf467e7a (diff) | |
parent | de043d330a8bf5855d4d983c804cd36727cb2406 (diff) |
Merge remote-tracking branch 'origin/roslyn' into new-project-model
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs index dda73fc351..2cd9d466c5 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs @@ -43,6 +43,8 @@ namespace MonoDevelop.Components public Control (object widget) { + if (widget == null) + throw new ArgumentNullException ("widget"); this.nativeWidget = widget; } @@ -63,7 +65,9 @@ namespace MonoDevelop.Components if (!(w is T)) w = ConvertToType (typeof(T), w); if (w is Gtk.Widget) { - var c = new CommandRouterContainer ((Gtk.Widget)w, this, true); + var gtkWidget = (Gtk.Widget)w; + var c = new CommandRouterContainer (gtkWidget, this, true); + c.FocusChain = new [] { gtkWidget }; c.Show (); nativeWidget = c; c.Destroyed += delegate { |