X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fmacosx%2Fmisc.m;fp=modules%2Fgui%2Fmacosx%2Fmisc.m;h=afd485a3ef0e415c544fdf0e284817a1c2f61577;hb=6ccde705af0d0f544b14c954984e82f94945099e;hp=9f313272bb7be60462318f91bc6d24efabfc679c;hpb=394563f07beca9ec0172ac063563c35044ba36e4;p=vlc diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m index 9f313272bb..afd485a3ef 100644 --- a/modules/gui/macosx/misc.m +++ b/modules/gui/macosx/misc.m @@ -116,15 +116,22 @@ static NSMutableArray *blackoutWindows = NULL; for(i = 0; i < [[NSScreen screens] count]; i++) { - VLCWindow *blackoutWindow; NSScreen *screen = [[NSScreen screens] objectAtIndex: i]; + VLCWindow *blackoutWindow; + NSRect screen_rect; + if([self isScreen: screen]) continue; + + screen_rect = [screen frame]; + screen_rect.origin.x = screen_rect.origin.y = 0.0f; + /* blackoutWindow alloc strategy - The NSMutableArray blackoutWindows has the blackoutWindow references - blackoutOtherDisplays is responsible for alloc/releasing its Windows */ - blackoutWindow = [[VLCWindow alloc] initWithContentRect: [screen frame] styleMask: NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; + blackoutWindow = [[VLCWindow alloc] initWithContentRect: screen_rect styleMask: NSBorderlessWindowMask + backing: NSBackingStoreBuffered defer: NO screen: screen]; [blackoutWindow setBackgroundColor:[NSColor blackColor]]; [blackoutWindow setLevel: NSFloatingWindowLevel]; /* Disappear when Expose is triggered */