Commit 797ca65c authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: changed the playlist toggle button behavior (close #6213)

it behaves this way now:

- no video => toggle window minimization

- active video in main window => toggle playlist / video

- active detached video => toggle window minimization

- active video in main window, option click on button => toggle window minimization
parent 4106e42f
......@@ -90,6 +90,7 @@
BOOL b_video_playback_enabled;
BOOL b_dropzone_active;
BOOL b_splitview_removed;
BOOL b_minimized_view;
int i_lastSplitViewHeight;
int i_lastShownVolume;
input_state_e cachedInputState;
......
......@@ -641,8 +641,12 @@ static VLCMainWindow *_o_sharedInstance = nil;
}
BOOL b_activeVideo = [[VLCMain sharedInstance] activeVideoPlayback];
BOOL b_restored = NO;
if ( !b_splitview_removed && ( (([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) != 0 && !b_activeVideo) || (b_nonembedded && b_activeVideo && sender != nil) ))
if ( !b_splitview_removed && ( (([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask) != 0 && b_activeVideo)
|| (b_nonembedded && sender != nil)
|| (!b_activeVideo && sender != nil)
|| b_minimized_view ) )
{
[self hideSplitView];
}
......@@ -650,8 +654,16 @@ static VLCMainWindow *_o_sharedInstance = nil;
{
if (b_splitview_removed)
{
if( !b_nonembedded ||( sender != nil && b_nonembedded))
if( !b_nonembedded || ( sender != nil && b_nonembedded))
[self showSplitView];
if (sender == nil)
b_minimized_view = YES;
else
b_minimized_view = NO;
if (b_activeVideo)
b_restored = YES;
}
if (b_dropzone_active && !b_activeVideo)
......@@ -662,7 +674,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
if (!b_nonembedded)
{
if ([o_video_view isHidden] && b_activeVideo) {
if (([o_video_view isHidden] && b_activeVideo) || b_restored ) {
[o_split_view setHidden: YES];
[o_video_view setHidden: NO];
[self makeFirstResponder: o_video_view];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment