protected override bool OnFocusOutEvent(Gdk.EventFocus evnt) { LogEnter(); try { var firstResponder = view?.Window.FirstResponder as NSView; if (firstResponder != null && view?.AncestorSharedWithView(firstResponder) == view) { firstResponder.Window.MakeFirstResponder(null); } return(base.OnFocusOutEvent(evnt)); } finally { LogExit(); } }
protected override bool OnFocusOutEvent(Gdk.EventFocus evnt) { LogEnter(); try { if (view?.Window?.FirstResponder is NSView firstResponder && view?.AncestorSharedWithView(firstResponder) == view) { firstResponder.Window?.MakeFirstResponder(firstResponder.Window.ContentView); } return(base.OnFocusOutEvent(evnt)); } finally { LogExit(); } }