Ich mache Vollbild auf diese Weise:Cocoa Vollbild Problem mit keyDown und keyUp
NSRect frame = [[NSScreen mainScreen] frame];
// Instantiate new borderless window
fullscreenWindow = [[NSWindow alloc] initWithContentRect:frame
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered defer: NO];
startingWindow = [self window];
[startingWindow setAcceptsMouseMovedEvents:NO];
[startingWindow orderOut:nil];
if(fullscreenWindow != nil)
{
// Set the options for our new fullscreen window
[fullscreenWindow setReleasedWhenClosed: YES];
[fullscreenWindow setAcceptsMouseMovedEvents:YES];
[fullscreenWindow setContentView: self];
[fullscreenWindow makeKeyAndOrderFront:self ];
[fullscreenWindow setLevel: NSPopUpMenuWindowLevel-1];
[fullscreenWindow makeFirstResponder:self];
}
Nach dem Einschalten nicht funktioniert keyDown und keyUp auf Vollbild. Was tun, damit es funktioniert?
Vielen Dank im Voraus.
Mit freundlichen Grüßen Chudziutki
Ich benutze das nicht, weil ich Fensterebene "NSPopUpMenuWindowLevel-1" nicht festlegen kann. Ich versuche dies mit Optionen "NSFullScreenModeWindowLevel" oder nach Verwendung dieser Funktion von SetLevel, aber beides funktioniert nicht. – Chudziutki