Commit ae329677 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Backport my 'black screens' fix

parent 67f45839
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
productName = vlc; productName = vlc;
productReference = 014CEA410018CDE011CA2923 /* VLC.bundle */; productReference = 014CEA410018CDE011CA2923 /* VLC.bundle */;
productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"> <!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<plist version=\"1.0\"> <plist version=\"1.0\">
<dict> <dict>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
...@@ -1097,7 +1097,7 @@ ...@@ -1097,7 +1097,7 @@
8ED6C27D03E2EB1C0059A3A7 /* intf.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = intf.m; path = ../../modules/gui/macosx/intf.m; sourceTree = SOURCE_ROOT; }; 8ED6C27D03E2EB1C0059A3A7 /* intf.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = intf.m; path = ../../modules/gui/macosx/intf.m; sourceTree = SOURCE_ROOT; };
8ED6C27E03E2EB1C0059A3A7 /* macosx.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = macosx.m; path = ../../modules/gui/macosx/macosx.m; sourceTree = SOURCE_ROOT; }; 8ED6C27E03E2EB1C0059A3A7 /* macosx.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = macosx.m; path = ../../modules/gui/macosx/macosx.m; sourceTree = SOURCE_ROOT; };
8ED6C27F03E2EB1C0059A3A7 /* misc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = misc.h; path = ../../modules/gui/macosx/misc.h; sourceTree = SOURCE_ROOT; }; 8ED6C27F03E2EB1C0059A3A7 /* misc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = misc.h; path = ../../modules/gui/macosx/misc.h; sourceTree = SOURCE_ROOT; };
8ED6C28003E2EB1C0059A3A7 /* misc.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = misc.m; path = ../../modules/gui/macosx/misc.m; sourceTree = SOURCE_ROOT; }; 8ED6C28003E2EB1C0059A3A7 /* misc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = misc.m; path = ../../modules/gui/macosx/misc.m; sourceTree = SOURCE_ROOT; };
8ED6C28103E2EB1C0059A3A7 /* open.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = open.h; path = ../../modules/gui/macosx/open.h; sourceTree = SOURCE_ROOT; }; 8ED6C28103E2EB1C0059A3A7 /* open.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = open.h; path = ../../modules/gui/macosx/open.h; sourceTree = SOURCE_ROOT; };
8ED6C28203E2EB1C0059A3A7 /* open.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = open.m; path = ../../modules/gui/macosx/open.m; sourceTree = SOURCE_ROOT; }; 8ED6C28203E2EB1C0059A3A7 /* open.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = open.m; path = ../../modules/gui/macosx/open.m; sourceTree = SOURCE_ROOT; };
8ED6C28303E2EB1C0059A3A7 /* playlist.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = playlist.h; path = ../../modules/gui/macosx/playlist.h; sourceTree = SOURCE_ROOT; }; 8ED6C28303E2EB1C0059A3A7 /* playlist.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = playlist.h; path = ../../modules/gui/macosx/playlist.h; sourceTree = SOURCE_ROOT; };
...@@ -1451,9 +1451,11 @@ ...@@ -1451,9 +1451,11 @@
089C1669FE841209C02AAC07 /* Project object */ = { 089C1669FE841209C02AAC07 /* Project object */ = {
isa = PBXProject; isa = PBXProject;
buildConfigurationList = C2F2A6EA09588F1B00018C74 /* Build configuration list for PBXProject "vlc" */; buildConfigurationList = C2F2A6EA09588F1B00018C74 /* Build configuration list for PBXProject "vlc" */;
compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1; hasScannedForEncodings = 1;
mainGroup = 089C166AFE841209C02AAC07 /* vlc */; mainGroup = 089C166AFE841209C02AAC07 /* vlc */;
projectDirPath = ""; projectDirPath = "";
projectRoot = "";
targets = ( targets = (
089C1673FE841209C02AAC07 /* vlc */, 089C1673FE841209C02AAC07 /* vlc */,
); );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* embeddedwindow.m: MacOS X interface module * embeddedwindow.m: MacOS X interface module
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2005 the VideoLAN team * Copyright (C) 2002-2005 the VideoLAN team
* $Id$ * $Id: 3bb1ea9a38b042486f837029f401ecd63700e444 $
* *
* Authors: Benjamin Pracht <bigben at videolan dot org> * Authors: Benjamin Pracht <bigben at videolan dot org>
* *
...@@ -174,8 +174,8 @@ ...@@ -174,8 +174,8 @@
NSRect screen_rect; NSRect screen_rect;
NSRect rect; NSRect rect;
vout_thread_t *p_vout = vlc_object_find( VLCIntf, VLC_OBJECT_VOUT, FIND_ANYWHERE ); vout_thread_t *p_vout = vlc_object_find( VLCIntf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
BOOL blackout_other_displays = var_GetBool( p_vout, "macosx-black" ); BOOL blackout_other_displays = config_GetInt( VLCIntf, "macosx-black" );
screen = [NSScreen screenWithDisplayID: (CGDirectDisplayID)var_GetInteger( p_vout, "video-device" )]; screen = [NSScreen screenWithDisplayID: (CGDirectDisplayID)var_GetInteger( p_vout, "video-device" )];
if( !screen ) if( !screen )
{ {
...@@ -216,8 +216,8 @@ ...@@ -216,8 +216,8 @@
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar); SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
if (blackout_other_displays) if (blackout_other_displays)
[screen blackoutOtherScreens]; /* We should do something like [screen blackoutOtherScreens]; */ [screen blackoutOtherScreens];
[o_view retain]; [o_view retain];
[[self contentView] replaceSubview:o_view with:o_temp_view]; [[self contentView] replaceSubview:o_view with:o_temp_view];
[o_temp_view setFrame:[o_view frame]]; [o_temp_view setFrame:[o_view frame]];
......
/***************************************************************************** /*****************************************************************************
* misc.m: code not specific to vlc * misc.m: code not specific to vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2003-2005 the VideoLAN team * Copyright (C) 2003-2008 the VideoLAN team
* $Id$ * $Id: 68d5c2e4bb6e3b6aed4dadf8dd76c76dcfee4794 $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Felix Paul Kühne <fkuehne at videolan dot org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -21,12 +22,13 @@ ...@@ -21,12 +22,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#include <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import <QuickTime/QuickTime.h>
#include "intf.h" /* VLCApplication */ #import "intf.h" /* VLCApplication */
#include "misc.h" #import "misc.h"
#include "playlist.h" #import "playlist.h"
#include "controls.h" #import "controls.h"
/***************************************************************************** /*****************************************************************************
* NSScreen (VLCAdditions) * NSScreen (VLCAdditions)
...@@ -91,7 +93,7 @@ static NSMutableArray *blackoutWindows = NULL; ...@@ -91,7 +93,7 @@ static NSMutableArray *blackoutWindows = NULL;
continue; continue;
screen_rect = [screen frame]; screen_rect = [screen frame];
screen_rect.origin.x = screen_rect.origin.y = 0.0f; screen_rect.origin.x = screen_rect.origin.y = 0;
/* blackoutWindow alloc strategy /* blackoutWindow alloc strategy
- The NSMutableArray blackoutWindows has the blackoutWindow references - The NSMutableArray blackoutWindows has the blackoutWindow references
...@@ -101,11 +103,15 @@ static NSMutableArray *blackoutWindows = NULL; ...@@ -101,11 +103,15 @@ static NSMutableArray *blackoutWindows = NULL;
backing: NSBackingStoreBuffered defer: NO screen: screen]; backing: NSBackingStoreBuffered defer: NO screen: screen];
[blackoutWindow setBackgroundColor:[NSColor blackColor]]; [blackoutWindow setBackgroundColor:[NSColor blackColor]];
[blackoutWindow setLevel: NSFloatingWindowLevel]; /* Disappear when Expose is triggered */ [blackoutWindow setLevel: NSFloatingWindowLevel]; /* Disappear when Expose is triggered */
[blackoutWindow displayIfNeeded];
[blackoutWindow orderFront: self]; [blackoutWindow orderFront: self];
[blackoutWindows addObject: blackoutWindow]; [blackoutWindows addObject: blackoutWindow];
[blackoutWindow release]; [blackoutWindow release];
if( [screen isMainScreen] )
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
} }
} }
...@@ -118,6 +124,8 @@ static NSMutableArray *blackoutWindows = NULL; ...@@ -118,6 +124,8 @@ static NSMutableArray *blackoutWindows = NULL;
VLCWindow *blackoutWindow = [blackoutWindows objectAtIndex: i]; VLCWindow *blackoutWindow = [blackoutWindows objectAtIndex: i];
[blackoutWindow close]; [blackoutWindow close];
} }
SetSystemUIMode( kUIModeNormal, 0);
} }
@end @end
......
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