I developed a screen watermarking program that worked fine before macOS 12.4. After upgrading to 12.4, "System Extension Blocked" pop-up cann't be click, but the other window is ok. Any body can tell me the macOS 12.4 has do what to "System Extension Blocked" pop-up !!! my sample code like this
code-block
NSScreen *screen = [NSScreen screens][0];
CGFloat windowWidth = screen.frame.size.width;
CGFloat windowHeight = screen.frame.size.height;
CGFloat x = screen.frame.origin.x;
CGFloat y = screen.frame.origin.y;
MyView* view = [[MyView alloc]initWithFrame:NSMakeRect(0, 0, windowWidth, windowHeight)];
NSWindow* window = [[NSPanel alloc] initWithContentRect:NSMakeRect(0, 0, windowWidth, windowHeight)
styleMask: NSWindowStyleMaskBorderless | NSWindowStyleMaskNonactivatingPanel
backing:NSBackingStoreBuffered
defer:NO];
[window setOpaque:NO];
[window setBackgroundColor:[NSColor clearColor]];
[window setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces | NSWindowCollectionBehaviorFullScreenAuxiliary];
[window setIgnoresMouseEvents:YES];
[window setHasShadow:NO];
[window setLevel:NSScreenSaverWindowLevel];
[window setContentView:views];
[window makeKeyAndOrderFront:nil];
and draw in MyView
code-block
- (void)drawRect:(NSRect)dirtyRect
{
NSRect screen = [self bounds];
int SW = screen.size.width;
int SH = screen.size.height;
[[NSColor clearColor] set];
NSRectFill(screen);
NSString * strH= @"watermark test.";
NSMutableDictionary *md = [NSMutableDictionary dictionary];
[md setObject:[NSFont fontWithName:@"Times" size:80] forKey:NSFontAttributeName];
[strH drawAtPoint:NSMakePoint(SH*0.5, SH*0.5) withAttributes:md];
[self setNeedsDisplay:YES];
}