Hey guys, have an odd request. I’m trying to make a window that floats above all other apps (setAlwaysOnTop works great for this) but that also doesn’t bring the app to the front when clicked or interacted with - from what I can tell that involves using the NSNonactivatingPanelMask flag. I found a chunk of code on the forums (from @justin) that I’ve attempted to hack to do that, but it doesn’t seem to work:
I’m thinking it’s either because the window (I’m just using a DocumentWindow) is an NSWindow, but it’s not (Also?) an NSPanel, or it’s because that flag needs to be set when the window is initially created, and setting it afterwards doesn’t do anything. I might also just be diving down the wrong hole entirely!
OK, I’m stumped. Can’t seem to get the native window to tell the component to resize whenever it’s frame is changed. I’ve spent hours trying to figure it out, but haven’t really made any progress. Anyone have any ideas?
I had to addtodesktop, then ask the peer for a reference to the view it’s newly-created, then set the resize mask for that view. There’s probably some extra chaff in there that’s unnecessary now, too.