Commit cb8e4a6d authored by David Fuhrmann's avatar David Fuhrmann

macosx: do not create VLCVoutController twice, remove singleton

The only valid instance of the vout controller is owned by VLCMain.
parent 329b8820
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
@interface VLCVoutWindowController : NSObject @interface VLCVoutWindowController : NSObject
+ (VLCVoutWindowController *)sharedInstance;
@property (readonly, atomic) NSLock *lock; @property (readonly, atomic) NSLock *lock;
@property (readonly, nonatomic) NSInteger currentStatusWindowLevel; @property (readonly, nonatomic) NSInteger currentStatusWindowLevel;
......
...@@ -211,18 +211,6 @@ void WindowClose(vout_window_t *p_wnd) ...@@ -211,18 +211,6 @@ void WindowClose(vout_window_t *p_wnd)
@implementation VLCVoutWindowController @implementation VLCVoutWindowController
+ (VLCVoutWindowController *)sharedInstance
{
static VLCVoutWindowController *sharedInstance = nil;
static dispatch_once_t pred;
dispatch_once(&pred, ^{
sharedInstance = [VLCVoutWindowController new];
});
return sharedInstance;
}
- (id)init - (id)init
{ {
self = [super init]; self = [super init];
......
...@@ -86,8 +86,6 @@ int OpenIntf (vlc_object_t *p_this) ...@@ -86,8 +86,6 @@ int OpenIntf (vlc_object_t *p_this)
[NSBundle loadNibNamed:@"MainWindow" owner:[VLCMain sharedInstance]]; [NSBundle loadNibNamed:@"MainWindow" owner:[VLCMain sharedInstance]];
[[[VLCMain sharedInstance] mainWindow] makeKeyAndOrderFront:nil]; [[[VLCMain sharedInstance] mainWindow] makeKeyAndOrderFront:nil];
[VLCVoutWindowController sharedInstance];
return VLC_SUCCESS; return VLC_SUCCESS;
} }
} }
......
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