mirror of
https://github.com/mpv-player/mpv
synced 2025-02-27 10:50:53 +00:00
cocoa: fix window size in certain circumstances
a combination of starting from bundle and fullscreen used the standard window size (960x480) from the pseudo GUI instead of the wanted video size.
This commit is contained in:
parent
8cbb2b5e9a
commit
4fe45fb3a1
@ -332,11 +332,6 @@
|
||||
display:NO];
|
||||
}
|
||||
|
||||
- (void)updateWindowFrame:(NSSize)newSize
|
||||
{
|
||||
_unfs_content_frame = [self frameRect:_unfs_content_frame forCenteredContentSize:newSize];
|
||||
}
|
||||
|
||||
- (void)tryDequeueSize
|
||||
{
|
||||
if (_queued_video_size.width <= 0.0 || _queued_video_size.height <= 0.0)
|
||||
@ -349,9 +344,8 @@
|
||||
|
||||
- (void)queueNewVideoSize:(NSSize)newSize
|
||||
{
|
||||
if ([self.adapter isInFullScreenMode]) {
|
||||
[self updateWindowFrame:newSize];
|
||||
} else {
|
||||
_unfs_content_frame = [self frameRect:_unfs_content_frame forCenteredContentSize:newSize];
|
||||
if (![self.adapter isInFullScreenMode]) {
|
||||
if (NSEqualSizes(_queued_video_size, newSize))
|
||||
return;
|
||||
_queued_video_size = newSize;
|
||||
|
Loading…
Reference in New Issue
Block a user