I’m trying to create a floating window that behaves like a PopOver, on Win and Mac desktop targets. The major difficulty is that it should be non-activating, so that it does not send the main window to the background when open.
On Mac Big Sur, I tried to configure the NSPanel with becomesKeyOnlyIfNeeded = True, but it does not seem to do anything. Perhaps it also needs some other property or window style/level, but I couldn’t find anything online.
In the Open event:
#if TargetCocoa then
declare sub setBecomesKeyOnlyIfNeeded lib “Cocoa” selector “setBecomesKeyOnlyIfNeeded:” (obj_id as Integer, value as Boolean)
setBecomesKeyOnlyIfNeeded self.handle, true
I haven’t had much success on Windows either. I tried setting the WS_EX_NOACTIVATE flag in the Window.Constructor to no avail.
Any help would be much appreciated!