From 37de2075ba30041dfb71471b573f7fb47e01b778 Mon Sep 17 00:00:00 2001 From: RH12503 <48951973+RH12503@users.noreply.github.com> Date: Mon, 5 Apr 2021 20:02:11 +0800 Subject: [PATCH] Revert "Disable full screen button (#650)" (#652) This reverts commit ab825b3f11e1067b82472245f4747e64792f39a1. --- lib/renderer/webview/webview.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/renderer/webview/webview.h b/lib/renderer/webview/webview.h index 79aba1dd0..da041b0d3 100644 --- a/lib/renderer/webview/webview.h +++ b/lib/renderer/webview/webview.h @@ -2338,9 +2338,10 @@ struct webview_priv size.height = height; [w->priv.window setMaxSize:size]; - dispatch_async(dispatch_get_main_queue(), ^{ - [[w->priv.window standardWindowButton:NSWindowZoomButton] setEnabled: NO]; - }); + [w->priv.window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary|NSWindowCollectionBehaviorFullScreenNone|NSWindowCollectionBehaviorFullScreenDisallowsTiling]; + + NSButton *button = [w->priv.window standardWindowButton:NSWindowZoomButton]; + [button setEnabled: NO]; } WEBVIEW_API void webview_set_fullscreen(struct webview *w, int fullscreen)