Commit afafeb19 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

Compare two NSScreen using their display id, rather than their pointer values. (pointed by thedj)

parent 2f8dbe1e
......@@ -42,6 +42,7 @@
+ (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
- (BOOL)isMainScreen;
- (BOOL)isScreen: (NSScreen*)screen;
- (CGDirectDisplayID)displayID;
- (void)blackoutOtherScreens;
+ (void)unblackoutScreens;
......
......@@ -95,6 +95,11 @@ static NSMutableArray *blackoutWindows = NULL;
return ([self displayID] == [[[NSScreen screens] objectAtIndex:0] displayID]);
}
- (BOOL)isScreen: (NSScreen*)screen
{
return ([self displayID] == [screen displayID]);
}
- (CGDirectDisplayID)displayID
{
return (CGDirectDisplayID)_screenNumber;
......@@ -113,7 +118,7 @@ static NSMutableArray *blackoutWindows = NULL;
{
VLCWindow *blackoutWindow;
NSScreen *screen = [[NSScreen screens] objectAtIndex: i];
if(self == screen)
if([self isScreen: screen])
continue;
/* blackoutWindow alloc strategy
- The NSMutableArray blackoutWindows has the blackoutWindow references
......
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