aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw
diff options
context:
space:
mode:
authorXiao-Yong <xjin@anl.gov>2020-01-13 22:33:59 -0600
committerRuss Cox <rsc@swtch.com>2020-01-13 23:33:59 -0500
commitb741db607a9033364fdab4151512ffbad2153ac9 (patch)
treeec37bd274c206a7ec8fc045da4e0178740b97c14 /src/cmd/devdraw
parent481b596d9389076d686832e0a3c26fc7b550c532 (diff)
downloadplan9port-b741db607a9033364fdab4151512ffbad2153ac9.tar.gz
plan9port-b741db607a9033364fdab4151512ffbad2153ac9.tar.bz2
plan9port-b741db607a9033364fdab4151512ffbad2153ac9.zip
devdraw: correctly hide Mac menu bar (#335)
`window:willUseFullScreenPresentationOptions:` is an instance method of the protocol `NSWindowDelegate`.
Diffstat (limited to 'src/cmd/devdraw')
-rw-r--r--src/cmd/devdraw/mac-screen.m18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/cmd/devdraw/mac-screen.m b/src/cmd/devdraw/mac-screen.m
index 8929e6b3..f0278e0d 100644
--- 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