Commit Diff


commit - 952a9afae06b4e13b1e0da3e768bbd4bf64b9ec5
commit + 3d1382b98a502d0c34d5ba2c462396acc515016e
blob - f0278e0d9239a629e0600d0392365b49b67759bf
blob + e02a2524005068a9abddeddcd11df6cbbe838e71
--- src/cmd/devdraw/mac-screen.m
+++ 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