游戏全屏时如何遮挡热点?当系统中启用了热角并且游戏处于全屏状态时,当我将光标移动到任何角落时,游戏被最小化。
我像这样更改为全屏:
fullscreenWindow = [[NSWindowFullscreen alloc] initWithContentRect:frame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer: NO];
mainWindow = [self window];
[mainWindow setAcceptsMouseMovedEvents:NO];
[mainWindow orderOut:nil];
// Set the options for our new fullscreen window
[fullscreenWindow setReleasedWhenClosed: YES];
[fullscreenWindow setLevel: NSFloatingWindowLevel];
[fullscreenWindow setHidesOnDeactivate:YES];
[fullscreenWindow setContentView: self];
[fullscreenWindow makeKeyAndOrderFront:self];
[fullscreenWindow makeFirstResponder:self];
[fullscreenWindow setAcceptsMouseMovedEvents:YES];