diff --git a/modules/gui/macosx/AudioEffects.m b/modules/gui/macosx/AudioEffects.m index f737de06e9..745d6dfa31 100644 --- a/modules/gui/macosx/AudioEffects.m +++ b/modules/gui/macosx/AudioEffects.m @@ -209,7 +209,7 @@ static VLCAudioEffects *_o_sharedInstance = nil; if ([o_window isKeyWindow]) [o_window orderOut:sender]; else { - [o_window setLevel: [[[VLCMain sharedInstance] voutController] currentWindowLevel]]; + [o_window setLevel: [[[VLCMain sharedInstance] voutController] currentStatusWindowLevel]]; [o_window makeKeyAndOrderFront:sender]; } } diff --git a/modules/gui/macosx/MainMenu.m b/modules/gui/macosx/MainMenu.m index 9faa83fafb..5f84d1712d 100644 --- a/modules/gui/macosx/MainMenu.m +++ b/modules/gui/macosx/MainMenu.m @@ -1160,7 +1160,7 @@ static VLCMainMenu *_o_sharedInstance = nil; - (IBAction)viewPreferences:(id)sender { - NSInteger i_level = [[[VLCMain sharedInstance] voutController] currentWindowLevel]; + NSInteger i_level = [[[VLCMain sharedInstance] voutController] currentStatusWindowLevel]; [[[VLCMain sharedInstance] simplePreferences] showSimplePrefsWithLevel:i_level]; } diff --git a/modules/gui/macosx/TrackSynchronization.m b/modules/gui/macosx/TrackSynchronization.m index f65e5ce7a9..d2deecdcf8 100644 --- a/modules/gui/macosx/TrackSynchronization.m +++ b/modules/gui/macosx/TrackSynchronization.m @@ -109,7 +109,7 @@ static VLCTrackSynchronization *_o_sharedInstance = nil; if ([o_window isVisible]) [o_window orderOut:sender]; else { - [o_window setLevel: [[[VLCMain sharedInstance] voutController] currentWindowLevel]]; + [o_window setLevel: [[[VLCMain sharedInstance] voutController] currentStatusWindowLevel]]; [o_window makeKeyAndOrderFront:sender]; } } diff --git a/modules/gui/macosx/VLCVoutWindowController.h b/modules/gui/macosx/VLCVoutWindowController.h index c555b73e78..c6a61dd32e 100644 --- a/modules/gui/macosx/VLCVoutWindowController.h +++ b/modules/gui/macosx/VLCVoutWindowController.h @@ -38,11 +38,13 @@ // save the status level if at least one video window is on status level NSUInteger i_statusLevelWindowCounter; NSInteger i_currentWindowLevel; + NSInteger i_currentFloatingWindowLevel; BOOL b_mainwindow_has_video; } -@property (readonly, nonatomic) NSInteger currentWindowLevel; +@property (readonly, nonatomic) NSInteger currentStatusWindowLevel; + - (VLCVoutView *)setupVoutForWindow:(vout_window_t *)p_wnd withProposedVideoViewPosition:(NSRect)videoViewPosition; - (void)removeVoutforDisplay:(NSValue *)o_key; diff --git a/modules/gui/macosx/VLCVoutWindowController.m b/modules/gui/macosx/VLCVoutWindowController.m index 305b6ebf40..99b2192dde 100644 --- a/modules/gui/macosx/VLCVoutWindowController.m +++ b/modules/gui/macosx/VLCVoutWindowController.m @@ -41,6 +41,7 @@ self = [super init]; o_vout_dict = [[NSMutableDictionary alloc] init]; i_currentWindowLevel = NSNormalWindowLevel; + i_currentFloatingWindowLevel = NSFloatingWindowLevel; return self; } @@ -397,15 +398,21 @@ return; i_currentWindowLevel = i_level; + if (i_level == NSNormalWindowLevel) { + i_currentFloatingWindowLevel = NSFloatingWindowLevel; + } else { + i_currentFloatingWindowLevel = i_level + 1; + } [[VLCMainWindow sharedInstance] setWindowLevel:i_level]; - [[VLCVideoEffects sharedInstance] updateCocoaWindowLevel:i_level]; - [[VLCAudioEffects sharedInstance] updateCocoaWindowLevel:i_level]; - [[[VLCMain sharedInstance] info] updateCocoaWindowLevel:i_level]; - [[VLCBookmarks sharedInstance] updateCocoaWindowLevel:i_level]; - [[VLCTrackSynchronization sharedInstance] updateCocoaWindowLevel:i_level]; + + [[VLCVideoEffects sharedInstance] updateCocoaWindowLevel:i_currentFloatingWindowLevel]; + [[VLCAudioEffects sharedInstance] updateCocoaWindowLevel:i_currentFloatingWindowLevel]; + [[[VLCMain sharedInstance] info] updateCocoaWindowLevel:i_currentFloatingWindowLevel]; + [[VLCBookmarks sharedInstance] updateCocoaWindowLevel:i_currentFloatingWindowLevel]; + [[VLCTrackSynchronization sharedInstance] updateCocoaWindowLevel:i_currentFloatingWindowLevel]; } -@synthesize currentWindowLevel=i_currentWindowLevel; +@synthesize currentStatusWindowLevel=i_currentFloatingWindowLevel; @end diff --git a/modules/gui/macosx/VideoEffects.m b/modules/gui/macosx/VideoEffects.m index fe1a2462d3..050ef98a76 100644 --- a/modules/gui/macosx/VideoEffects.m +++ b/modules/gui/macosx/VideoEffects.m @@ -572,7 +572,7 @@ static VLCVideoEffects *_o_sharedInstance = nil; if ([o_window isKeyWindow]) [o_window orderOut:sender]; else { - [o_window setLevel: [[[VLCMain sharedInstance] voutController] currentWindowLevel]]; + [o_window setLevel: [[[VLCMain sharedInstance] voutController] currentStatusWindowLevel]]; [o_window makeKeyAndOrderFront:sender]; } } diff --git a/modules/gui/macosx/bookmarks.m b/modules/gui/macosx/bookmarks.m index b59343402a..a322cdda2c 100644 --- a/modules/gui/macosx/bookmarks.m +++ b/modules/gui/macosx/bookmarks.m @@ -124,7 +124,7 @@ static VLCBookmarks *_o_sharedInstance = nil; { /* show the window, called from intf.m */ [o_bookmarks_window displayIfNeeded]; - [o_bookmarks_window setLevel: [[[VLCMain sharedInstance] voutController] currentWindowLevel]]; + [o_bookmarks_window setLevel: [[[VLCMain sharedInstance] voutController] currentStatusWindowLevel]]; [o_bookmarks_window makeKeyAndOrderFront:nil]; } diff --git a/modules/gui/macosx/playlistinfo.m b/modules/gui/macosx/playlistinfo.m index 40bb85f8dd..0e2cd2fbef 100644 --- a/modules/gui/macosx/playlistinfo.m +++ b/modules/gui/macosx/playlistinfo.m @@ -151,7 +151,7 @@ static VLCInfo *_o_sharedInstance = nil; else [self initMediaPanelStats]; - NSInteger i_level = [[[VLCMain sharedInstance] voutController] currentWindowLevel]; + NSInteger i_level = [[[VLCMain sharedInstance] voutController] currentStatusWindowLevel]; [o_info_window setLevel: i_level]; [o_info_window makeKeyAndOrderFront: self]; }