Allow panels to appear on top of full-screen apps

This commit is contained in:
Antonio Scandurra 2022-09-16 10:48:20 +02:00
parent 3163366a10
commit 7a16e9c048

View file

@ -18,7 +18,8 @@ use block::ConcreteBlock;
use cocoa::{
appkit::{
CGPoint, NSApplication, NSBackingStoreBuffered, NSScreen, NSView, NSViewHeightSizable,
NSViewWidthSizable, NSWindow, NSWindowButton, NSWindowStyleMask,
NSViewWidthSizable, NSWindow, NSWindowButton, NSWindowCollectionBehavior,
NSWindowStyleMask,
},
base::{id, nil},
foundation::{
@ -497,6 +498,10 @@ impl Window {
native_window,
setAnimationBehavior: NSWindowAnimationBehaviorUtilityWindow
];
native_window.setCollectionBehavior_(
NSWindowCollectionBehavior::NSWindowCollectionBehaviorCanJoinAllSpaces |
NSWindowCollectionBehavior::NSWindowCollectionBehaviorFullScreenAuxiliary
);
}
}
native_window.makeKeyAndOrderFront_(nil);