]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/misc.m
Compare two NSScreen using their display id, rather than their pointer values. (point...
[vlc] / modules / gui / macosx / misc.m
index b61c60107a2d9a463cd453b395fb8863d22fe368..9f313272bb7be60462318f91bc6d24efabfc679c 100644 (file)
@@ -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