mirror of https://github.com/mpv-player/mpv
fix fullscreen menubar item behaviour
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15883 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2814dd6533
commit
762820ba8f
|
@ -491,20 +491,36 @@ static uint32_t control(uint32_t request, void *data, ...)
|
||||||
if(sender == kAspectFullCmd)
|
if(sender == kAspectFullCmd)
|
||||||
{
|
{
|
||||||
movie_aspect = 4.0f/3.0f;
|
movie_aspect = 4.0f/3.0f;
|
||||||
|
|
||||||
|
if(isFullscreen)
|
||||||
|
{
|
||||||
|
[self reshape];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
frame.size.width = d_width*winSizeMult;
|
frame.size.width = d_width*winSizeMult;
|
||||||
frame.size.height = (d_width/movie_aspect)*winSizeMult;
|
frame.size.height = (d_width/movie_aspect)*winSizeMult;
|
||||||
[window setContentSize: frame.size];
|
[window setContentSize: frame.size];
|
||||||
[self reshape];
|
[self reshape];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(sender == kAspectWideCmd)
|
if(sender == kAspectWideCmd)
|
||||||
{
|
{
|
||||||
movie_aspect = 16.0f/9.0f;
|
movie_aspect = 16.0f/9.0f;
|
||||||
|
|
||||||
|
if(isFullscreen)
|
||||||
|
{
|
||||||
|
[self reshape];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
frame.size.width = d_width*winSizeMult;
|
frame.size.width = d_width*winSizeMult;
|
||||||
frame.size.height = (d_width/movie_aspect)*winSizeMult;
|
frame.size.height = (d_width/movie_aspect)*winSizeMult;
|
||||||
[window setContentSize: frame.size];
|
[window setContentSize: frame.size];
|
||||||
[self reshape];
|
[self reshape];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -621,7 +637,6 @@ static uint32_t control(uint32_t request, void *data, ...)
|
||||||
|
|
||||||
if( ((curTime - lastTime) >= 5) || (lastTime == 0) )
|
if( ((curTime - lastTime) >= 5) || (lastTime == 0) )
|
||||||
{
|
{
|
||||||
HideMenuBar();
|
|
||||||
HideCursor();
|
HideCursor();
|
||||||
mouseHide = YES;
|
mouseHide = YES;
|
||||||
lastTime = curTime;
|
lastTime = curTime;
|
||||||
|
@ -671,8 +686,7 @@ static uint32_t control(uint32_t request, void *data, ...)
|
||||||
{
|
{
|
||||||
if(!isRootwin)
|
if(!isRootwin)
|
||||||
{
|
{
|
||||||
//hide menubar and mouse if fullscreen on main display
|
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
|
||||||
HideMenuBar();
|
|
||||||
HideCursor();
|
HideCursor();
|
||||||
mouseHide = YES;
|
mouseHide = YES;
|
||||||
}
|
}
|
||||||
|
@ -691,8 +705,9 @@ static uint32_t control(uint32_t request, void *data, ...)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
SetSystemUIMode( kUIModeNormal, NULL);
|
||||||
|
|
||||||
isFullscreen = 0;
|
isFullscreen = 0;
|
||||||
ShowMenuBar();
|
|
||||||
ShowCursor();
|
ShowCursor();
|
||||||
mouseHide = NO;
|
mouseHide = NO;
|
||||||
|
|
||||||
|
@ -851,7 +866,6 @@ static uint32_t control(uint32_t request, void *data, ...)
|
||||||
{
|
{
|
||||||
if(isFullscreen && !isRootwin)
|
if(isFullscreen && !isRootwin)
|
||||||
{
|
{
|
||||||
ShowMenuBar();
|
|
||||||
ShowCursor();
|
ShowCursor();
|
||||||
mouseHide = NO;
|
mouseHide = NO;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue