As I mentioned in a previous post, we are using auto-hide tool windows with no additional UI (tabs, title bar etc) to provide a "slide-in panel" feature. When the tool window's top-left corner is exactly at (0,0) screen coordinates (e.g. when parent window is in full screen mode) then clicking on another window (on another monitor) doesn't hide the tool window.
We have a Blueprint licence so I did some debugging. The problem seems to be with the use of Mouse.GetPosition in AutoHidePopupPanel.OnIsKeyboardFocusWithinChanged. There is a known issue with this method when the mouse is not within the calling window (see https://wpf.2000things.com/2012/10/18/671-mouse-getposition-only-works-when-mouse-is-in-window/) - in this case it always returns (0,0) relative to the passed element, which if the passed element is itself at (0,0) is always (0,0). The next line checks if the mouse is over the popup panel, which is always true so the hide is skipped.
I tried making a change to P/Invoke GetCursorPos instead, which seems to work OK:
if (PresentationSource.FromVisual(this) != null) {
// Do a check to ensure the mouse isn't over any interop content
var location = PointFromScreen(Interop.NativeMethods.GetCursorPosition());
if (new Rect(new Point(), this.GetCurrentSize()).Contains(location))
return;
}
The FromVisual call is needed because otherwise PointFromScreen will throw if the window is closed while the popup is open.
We'd rather not use a custom build from source, we tried this on a previous project and its a maintenance headache. But this isn't a critical problem so happy to wait until the next maintenance release without further workarounds.