aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2020-01-13 23:56:29 -0500
committerRuss Cox <rsc@swtch.com>2020-01-13 23:56:29 -0500
commit3d1382b98a502d0c34d5ba2c462396acc515016e (patch)
treeb781ff48d7290f529d67706c218335507d8191ca /src
parent952a9afae06b4e13b1e0da3e768bbd4bf64b9ec5 (diff)
downloadplan9port-3d1382b98a502d0c34d5ba2c462396acc515016e.tar.gz
plan9port-3d1382b98a502d0c34d5ba2c462396acc515016e.tar.bz2
plan9port-3d1382b98a502d0c34d5ba2c462396acc515016e.zip
devdraw: hide dock in full screen mode
Unfortunately this hides the dock even if it is on a different screen. We need to figure out how to tell. But this is more usable than not. Probably.
Diffstat (limited to 'src')
-rw-r--r--src/cmd/devdraw/mac-screen.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cmd/devdraw/mac-screen.m b/src/cmd/devdraw/mac-screen.m
index f0278e0d..e02a2524 100644
--- a/src/cmd/devdraw/mac-screen.m
+++ b/src/cmd/devdraw/mac-screen.m
@@ -936,6 +936,19 @@ rpc_setmouse(Client *c, Point p)
o |= NSApplicationPresentationHideDock | NSApplicationPresentationHideMenuBar;
return o;
}
+
+- (void)windowWillEnterFullScreen:(NSNotification*)notification {
+ // TODO: This should only be done if the window
+ // is on the screen with the dock.
+ // But how can you tell which window has the dock?
+ [[NSApplication sharedApplication]
+ setPresentationOptions:NSApplicationPresentationHideMenuBar | NSApplicationPresentationHideDock];
+}
+
+- (void)windowDidExitFullScreen:(NSNotification*)notification {
+ [[NSApplication sharedApplication]
+ setPresentationOptions:NSApplicationPresentationDefault];
+}
@end
static uint