From f69a6f04133df61e2ab23553496a070f27f5b732 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Sat, 23 Mar 2024 15:20:02 +0900 Subject: [PATCH] ui/cocoa: Resize window after toggling zoom-to-fit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resize the window so that the content will fit without zooming. Fixes: 91aa508d0274 ("ui/cocoa: Let the platform toggle fullscreen") Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Message-ID: <20240323-fixes-v2-2-18651a2b0394@daynix.com> Signed-off-by: Philippe Mathieu-Daudé --- ui/cocoa.m | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index 17e125d66d..3efa8ac1a9 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1408,6 +1408,7 @@ static CGEventRef handleTapEvent(CGEventTapProxy proxy, CGEventType type, CGEven [[cocoaView window] setStyleMask:styleMask]; [sender setState:styleMask & NSWindowStyleMaskResizable ? NSControlStateValueOn : NSControlStateValueOff]; + [cocoaView resizeWindow]; } - (void)toggleZoomInterpolation:(id) sender