Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Medrano <josmed@microsoft.com>2019-11-15 04:34:28 +0300
committermonojenkins <jo.shields+jenkins@xamarin.com>2019-11-15 12:09:17 +0300
commit1317d211c1519c2079887d14b761caae2165ab7d (patch)
treeae3b72bb797c2282950e2adc479ce1ecf8feff2f
parentf36b79deafb0c681ff237b9fe631b588e91f80aa (diff)
Ensures don't close autohide window if focus are in embedded panels Fixes VSTS #1001359 - Properties window opens and then closes on right clicking project file and select Properties
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockBarItem.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockBarItem.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockBarItem.cs
index 9556f15db2..3e8981b0af 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockBarItem.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockBarItem.cs
@@ -400,8 +400,17 @@ namespace MonoDevelop.Components.Docking
return true;
if (!force) {
// Don't hide the item if it has the focus. Try again later.
+#if MAC
+ bool hasTopLevel = it.Widget.FocusChild != null && autoShowFrame != null &&
+ autoShowFrame.Toplevel is IdeWindow ideWindow && (
+ ideWindow.HasToplevelFocus || Mac.GtkMacInterop.GetGtkWindow (AppKit.NSApplication.SharedApplication.KeyWindow) == ideWindow);
+
+ if (hasTopLevel)
+ return true;
+#else
if (it.Widget.FocusChild != null && autoShowFrame != null && ((Gtk.Window)autoShowFrame.Toplevel).HasToplevelFocus)
return true;
+#endif
// Don't hide the item if the mouse pointer is still inside the window. Try again later.
int px, py;
it.Widget.GetPointer (out px, out py);