qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PULL 12/13] ui/cocoa: Resize window after toggling zoom-to-fit


From: Philippe Mathieu-Daudé
Subject: [PULL 12/13] ui/cocoa: Resize window after toggling zoom-to-fit
Date: Tue, 26 Mar 2024 16:45:03 +0100

From: Akihiko Odaki <akihiko.odaki@daynix.com>

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 <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20240323-fixes-v2-2-18651a2b0394@daynix.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 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 @@ - (void)zoomToFit:(id) sender
 
     [[cocoaView window] setStyleMask:styleMask];
     [sender setState:styleMask & NSWindowStyleMaskResizable ? 
NSControlStateValueOn : NSControlStateValueOff];
+    [cocoaView resizeWindow];
 }
 
 - (void)toggleZoomInterpolation:(id) sender
-- 
2.41.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]