@@ -1379,8 +1379,10 @@ - (void)zoomToFit:(id) sender
{
stretch_video = !stretch_video;
if (stretch_video == true) {
+ [normalWindow setStyleMask:[normalWindow styleMask] | NSWindowStyleMaskResizable];
[sender setState: NSControlStateValueOn];
} else {
+ [normalWindow setStyleMask:[normalWindow styleMask] & ~NSWindowStyleMaskResizable];
[cocoaView resizeWindow];
[sender setState: NSControlStateValueOff];
}
@@ -2033,6 +2035,7 @@ static void cocoa_display_init(DisplayState *ds, DisplayOptions *opts)
if (opts->u.cocoa.has_zoom_to_fit && opts->u.cocoa.zoom_to_fit) {
stretch_video = true;
+ [normalWindow setStyleMask:[normalWindow styleMask] | NSWindowStyleMaskResizable];
}
create_initial_menus();
The window will be resizable when zoom-to-fit is on. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> --- ui/cocoa.m | 3 +++ 1 file changed, 3 insertions(+)