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 @@
productName = vlc;
productReference = 014CEA410018CDE011CA2923 /* VLC.bundle */;
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\">
<dict>
<key>CFBundleDevelopmentRegion</key>
......@@ -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; };
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; };
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; };
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; };
......@@ -1451,9 +1451,11 @@
089C1669FE841209C02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = C2F2A6EA09588F1B00018C74 /* Build configuration list for PBXProject "vlc" */;
compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
mainGroup = 089C166AFE841209C02AAC07 /* vlc */;
projectDirPath = "";
projectRoot = "";
targets = (
089C1673FE841209C02AAC07 /* vlc */,
);
......
......@@ -2,7 +2,7 @@
* embeddedwindow.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2002-2005 the VideoLAN team
* $Id$
* $Id: 3bb1ea9a38b042486f837029f401ecd63700e444 $
*
* Authors: Benjamin Pracht <bigben at videolan dot org>
*
......@@ -174,7 +174,7 @@
NSRect screen_rect;
NSRect rect;
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" )];
if( !screen )
......@@ -216,7 +216,7 @@
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
if (blackout_other_displays)
[screen blackoutOtherScreens]; /* We should do something like [screen blackoutOtherScreens]; */
[screen blackoutOtherScreens];
[o_view retain];
[[self contentView] replaceSubview:o_view with:o_temp_view];
......
/*****************************************************************************
* misc.m: code not specific to vlc
*****************************************************************************
* Copyright (C) 2003-2005 the VideoLAN team
* $Id$
* Copyright (C) 2003-2008 the VideoLAN team
* $Id: 68d5c2e4bb6e3b6aed4dadf8dd76c76dcfee4794 $
*
* 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
* it under the terms of the GNU General Public License as published by
......@@ -21,12 +22,13 @@
* 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 */
#include "misc.h"
#include "playlist.h"
#include "controls.h"
#import "intf.h" /* VLCApplication */
#import "misc.h"
#import "playlist.h"
#import "controls.h"
/*****************************************************************************
* NSScreen (VLCAdditions)
......@@ -91,7 +93,7 @@ static NSMutableArray *blackoutWindows = NULL;
continue;
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
- The NSMutableArray blackoutWindows has the blackoutWindow references
......@@ -102,10 +104,14 @@ static NSMutableArray *blackoutWindows = NULL;
[blackoutWindow setBackgroundColor:[NSColor blackColor]];
[blackoutWindow setLevel: NSFloatingWindowLevel]; /* Disappear when Expose is triggered */
[blackoutWindow displayIfNeeded];
[blackoutWindow orderFront: self];
[blackoutWindows addObject: blackoutWindow];
[blackoutWindow release];
if( [screen isMainScreen] )
SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
}
}
......@@ -118,6 +124,8 @@ static NSMutableArray *blackoutWindows = NULL;
VLCWindow *blackoutWindow = [blackoutWindows objectAtIndex: i];
[blackoutWindow close];
}
SetSystemUIMode( kUIModeNormal, 0);
}
@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