devdraw: correctly hide Mac menu bar (#335)

`window:willUseFullScreenPresentationOptions:` is an instance method
of the protocol `NSWindowDelegate`.
This commit is contained in:
Xiao-Yong 2020-01-13 22:33:59 -06:00 committed by Russ Cox
parent 481b596d93
commit b741db607a

View file

@ -93,15 +93,6 @@ rpc_shutdown(void)
gfx_started();
}
- (NSApplicationPresentationOptions)window:(id)arg
willUseFullScreenPresentationOptions:(NSApplicationPresentationOptions)proposedOptions {
NSApplicationPresentationOptions o;
o = proposedOptions;
o &= ~(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar);
o |= NSApplicationPresentationHideDock | NSApplicationPresentationHideMenuBar;
return o;
}
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication {
return client0 != nil;
}
@ -936,6 +927,15 @@ rpc_setmouse(Client *c, Point p)
gfx_keystroke(self.client, Kbs);
}
}
- (NSApplicationPresentationOptions)window:(id)arg
willUseFullScreenPresentationOptions:(NSApplicationPresentationOptions)proposedOptions {
NSApplicationPresentationOptions o;
o = proposedOptions;
o &= ~(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar);
o |= NSApplicationPresentationHideDock | NSApplicationPresentationHideMenuBar;
return o;
}
@end
static uint