Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit 4e69b03

Browse files
authored
Merge pull request #9324 from mono/fix-1001359
Ensures don't close autohide window if focus are in embedded panels
2 parents 699af0e + 3aaa468 commit 4e69b03

File tree

1 file changed

+9
-0
lines changed
  • main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking

1 file changed

+9
-0
lines changed

main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockBarItem.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,17 @@ void ScheduleAutoHide (bool cancelAutoShow, bool force)
400400
return true;
401401
if (!force) {
402402
// Don't hide the item if it has the focus. Try again later.
403+
#if MAC
404+
bool hasTopLevel = it.Widget.FocusChild != null && autoShowFrame != null &&
405+
autoShowFrame.Toplevel is IdeWindow ideWindow && (
406+
ideWindow.HasToplevelFocus || Mac.GtkMacInterop.GetGtkWindow (AppKit.NSApplication.SharedApplication.KeyWindow) == ideWindow);
407+
408+
if (hasTopLevel)
409+
return true;
410+
#else
403411
if (it.Widget.FocusChild != null && autoShowFrame != null && ((Gtk.Window)autoShowFrame.Toplevel).HasToplevelFocus)
404412
return true;
413+
#endif
405414
// Don't hide the item if the mouse pointer is still inside the window. Try again later.
406415
int px, py;
407416
it.Widget.GetPointer (out px, out py);

0 commit comments

Comments
 (0)