diff options
3 files changed, 34 insertions, 3 deletions
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs index 579854ddc2..70bfadff65 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs @@ -236,6 +236,7 @@ namespace MonoDevelop.SourceEditor scrolledBackground = new EventBox (); scrolledBackground.Accessible.SetShouldIgnore (true); scrolledWindow = new CompactScrolledWindow (); + scrolledWindow.CanFocus = false; scrolledWindow.ButtonPressEvent += PrepareEvent; scrolledWindow.Accessible.SetShouldIgnore (true); scrolledBackground.Add (scrolledWindow); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs index 08f596c6aa..b887e4d0da 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs @@ -354,11 +354,42 @@ namespace MonoDevelop.Ide.Gui static IEnumerable<Gtk.Widget> GetFocussableWidgets (Gtk.Widget widget) { var c = widget as Container; - if (widget.CanFocus) + + if (widget.CanFocus) { yield return widget; + } + if (c != null) { - foreach (var f in c.FocusChain.SelectMany (GetFocussableWidgets).Where (y => y != null)) + foreach (var f in c.FocusChain.SelectMany (GetFocussableWidgets).Where (y => y != null)) { yield return f; + } + } + + if (c?.Children?.Length != 0) { + foreach (var f in c.Children) { + var container = f as Container; + if (container != null) { + foreach (var child in GetFocussableChildren (container)) { + yield return child; + } + } + } + } + } + + static IEnumerable<Gtk.Widget> GetFocussableChildren (Gtk.Container container) + { + if (container.CanFocus) { + yield return container; + } + + foreach (var f in container.Children) { + var c = f as Container; + if (c != null) { + foreach (var child in GetFocussableChildren (c)) { + yield return child; + } + } } } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs index 9a9944290d..a1c6bb1584 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs @@ -585,7 +585,6 @@ namespace MonoDevelop.Ide.Gui if (info.Options.HasFlag (OpenDocumentOptions.BringToFront)) { doc.Select (); - doc.Window.SelectWindow (); NavigationHistoryService.LogActiveDocument (); } return doc; |