Disable full screen button (#650)

This commit is contained in:
RH12503
2021-04-05 15:51:54 +08:00
committed by GitHub
parent ff7b6eacaf
commit ab825b3f11

View File

@@ -2338,10 +2338,9 @@ struct webview_priv
size.height = height;
[w->priv.window setMaxSize:size];
[w->priv.window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary|NSWindowCollectionBehaviorFullScreenNone|NSWindowCollectionBehaviorFullScreenDisallowsTiling];
NSButton *button = [w->priv.window standardWindowButton:NSWindowZoomButton];
[button setEnabled: NO];
dispatch_async(dispatch_get_main_queue(), ^{
[[w->priv.window standardWindowButton:NSWindowZoomButton] setEnabled: NO];
});
}
WEBVIEW_API void webview_set_fullscreen(struct webview *w, int fullscreen)