commit b741db607a9033364fdab4151512ffbad2153ac9 from: Xiao-Yong via: Russ Cox date: Tue Jan 14 04:33:59 2020 UTC devdraw: correctly hide Mac menu bar (#335) `window:willUseFullScreenPresentationOptions:` is an instance method of the protocol `NSWindowDelegate`. commit - 481b596d9389076d686832e0a3c26fc7b550c532 commit + b741db607a9033364fdab4151512ffbad2153ac9 blob - 8929e6b3f4f946bfc418ccbf9fabd8c9c877db7f blob + f0278e0d9239a629e0600d0392365b49b67759bf --- src/cmd/devdraw/mac-screen.m +++ src/cmd/devdraw/mac-screen.m @@ -91,15 +91,6 @@ rpc_shutdown(void) [[NSApp dockTile] display]; 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 { @@ -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