Show a floating window above a full screen window

I have a borderless global floating palette that can be brought up in any app by pressing a hotkey. It’s a bit similar to the Spotlight window in this respect, and it works very well. But it will not show if invoked when a full screen window (in another app) is showing – it’s hidden. I’ve found a number of suggestions on StackOverFlow about how to do this, but I’ve been unsuccessful so far.

Here the code in the window’s Open event that creates the look I want:

dim w as NSWindowMBS = self.NSWindowMBS
w.TitlebarAppearsTransparent = true
w.StyleMask = BitwiseOr(w.styleMask, w.NSFullSizeContentViewWindowMask)
w.TitleVisibility = w.NSWindowTitleHidden

I’ve tried combination of the following to set the style mask so the window is visible over a full screen window, thus far with no success

w.StyleMask = BitwiseOr(w.styleMask, w.NSWindowCollectionBehaviorCanJoinAllSpaces)
w.StyleMask = BitwiseOr(w.styleMask, w.NSWindowCollectionBehaviorFullScreenAuxiliary)

Any suggestions?

You need to change the layer.
Level property or so…,

@Christian Schmitz Thanks, but I’ve tried setting the window level with no success. I believe this sets the level within an app, but not between apps. I’ve modified your example “Fullsize Window Content” by setting the window level to the variants listed in your NSWindow class page (e.g. NSScreenSaverLevel, NSStatusWindowLevel, etc.) but it’s still hidden when another app is made full screen.

What version of the OS? Apple changed some things w.r.t. window layering in High Sierra 10.13.

I’m on 10.13.5/6 (two different machines).

Can you detail these changes? I remember something about the order changing, but the layer above everything, but below the screensaver should still be in that position I thought (I use that layer and am now concerned).

Some of them are detailed here: https://iscreensaver.com/help/notes/high_sierra/high_sierra.shtml the main issue that seems related is that in 10.13 and later, a background app can no longer put a window at a level in front of the screensaver or lock screen. I wonder if this also applies in the case where one app is in fullscreen mode (but the screensaver is not running)?

I know of other apps that can put up a window in front of another’s full screen window (e.g. Alfred, and of course Spotlight), so it still can be done in High Sierra. Michael, how are you doing this now? What is the window level setting you use? And is there any other values you need to set?

This was the solution I finally came up with:

w.collectionBehavior = w.NSWindowCollectionBehaviorFullScreenAuxiliary (where w is a NSWindowMBS)

or

NSWindow(self).FullscreenAllowedAuxiliary = true (if using MacOSLib)