Skip to content

Instantly share code, notes, and snippets.

@DargonLee
Created October 21, 2022 01:51
Show Gist options
  • Save DargonLee/e5b35a33d71dcb59e1b49b6a6208cfc9 to your computer and use it in GitHub Desktop.
Save DargonLee/e5b35a33d71dcb59e1b49b6a6208cfc9 to your computer and use it in GitHub Desktop.
NSRect rect = CGRectMake(315, 344, 760, 548);
NSWindowStyleMask style = NSWindowStyleMaskBorderless | NSWindowStyleMaskNonactivatingPanel;
NSPanel *panel = [[NSPanel alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:YES screen:[NSScreen mainScreen]];
panel.level = NSFloatingWindowLevel;
// panel.level = NSScreenSaverWindowLevel;
panel.collectionBehavior = NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehaviorFullScreenAuxiliary;
[panel orderFrontRegardless];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment