]> git.sesse.net Git - vlc/commitdiff
Compare two NSScreen using their display id, rather than their pointer values. (point...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 3 Mar 2007 01:05:53 +0000 (01:05 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 3 Mar 2007 01:05:53 +0000 (01:05 +0000)
modules/gui/macosx/misc.h
modules/gui/macosx/misc.m

index 6a636d81c21d30ff66241e4a8946d17bd07cefab..a2dfefd7c0e718b1da975ba139b9020248d19c2b 100644 (file)
@@ -42,6 +42,7 @@
 
 + (NSScreen *)screenWithDisplayID: (CGDirectDisplayID)displayID;
 - (BOOL)isMainScreen;
+- (BOOL)isScreen: (NSScreen*)screen;
 - (CGDirectDisplayID)displayID;
 - (void)blackoutOtherScreens;
 + (void)unblackoutScreens;
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