mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
devdraw: correctly hide Mac menu bar (#335)
`window:willUseFullScreenPresentationOptions:` is an instance method of the protocol `NSWindowDelegate`.
This commit is contained in:
parent
481b596d93
commit
b741db607a
1 changed files with 9 additions and 9 deletions
|
@ -93,15 +93,6 @@ rpc_shutdown(void)
|
||||||
gfx_started();
|
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 {
|
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication {
|
||||||
return client0 != nil;
|
return client0 != nil;
|
||||||
}
|
}
|
||||||
|
@ -936,6 +927,15 @@ rpc_setmouse(Client *c, Point p)
|
||||||
gfx_keystroke(self.client, Kbs);
|
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
|
@end
|
||||||
|
|
||||||
static uint
|
static uint
|
||||||
|
|
Loading…
Reference in a new issue