]> git.proxmox.com Git - mirror_qemu.git/commitdiff
ui/cocoa: Resize window after toggling zoom-to-fit
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Sat, 23 Mar 2024 06:20:02 +0000 (15:20 +0900)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 26 Mar 2024 13:32:54 +0000 (14:32 +0100)
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

index 17e125d66d2205c69965f5ca515a733058bf7e12..3efa8ac1a9f171c4d0803bfe63742c860877ca24 100644 (file)
@@ -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