NSPanel
has a “Non activating” option for HUD Panels. I’d like to get that same functionality working on an NSWindow
, i.e. I want the window to accept clicks but not take focus away from whatever the active app is (by this I mean the app that was active before clicking on the window activated my app—in this case Sketch).
I have tried creating an NSWindow
subclass and setting canBecomeMainWindow
and canBecomeKeyWindow
to NO
but that doesn’t seem to be working—I think because those settings only apply to windows within the same app.
What I’m trying to do here is prevent this flickering. I’m pretty sure this is doable as apps like Alfred seem to be doing it.
NSPanel
? It is a window. Anything you can do with anNSWindow
, you can also do with anNSPanel
. There are a few methods/properties which change their default behavior, but you can use overrides to change those back. – Ken ThomasesNSWindowTitleHidden
. In myNSWindow
I have these appearance settings and then aNSVisualEffectView
set to light:self.window.styleMask = self.window.styleMask | NSFullSizeContentViewWindowMask; self.window.titleVisibility = NSWindowTitleHidden; self.window.titlebarAppearsTransparent = YES;
– Elliot Jacksonappearance
property (which it has by virtue of conforming to theNSAppearanceCustomization
protocol) to[NSAppearance appearanceNamed:NSAppearanceNameVibrantLight]
. – Ken Thomases