commit b741db607a9033364fdab4151512ffbad2153ac9 parent 481b596d9389076d686832e0a3c26fc7b550c532 Author: Xiao-Yong <xjin@anl.gov> Date: Mon, 13 Jan 2020 22:33:59 -0600 devdraw: correctly hide Mac menu bar (#335) `window:willUseFullScreenPresentationOptions:` is an instance method of the protocol `NSWindowDelegate`. Diffstat:
M | src/cmd/devdraw/mac-screen.m | | | 18 | +++++++++--------- |
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/cmd/devdraw/mac-screen.m b/src/cmd/devdraw/mac-screen.m @@ -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