[vlc-devel] commit: Backport my 'black screens' fix ( Felix Paul Kühne )
git version control
git at videolan.org
Fri Mar 28 16:02:45 CET 2008
vlc | branch: 0.8.6-bugfix | Felix Paul Kühne <fkuehne at videolan.org> | Fri Mar 28 16:02:42 2008 +0100| [ae329677e0580fe98c501846a9cb9809b8eebe11]
Backport my 'black screens' fix
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ae329677e0580fe98c501846a9cb9809b8eebe11
---
extras/MacOSX/vlc.xcodeproj/project.pbxproj | 6 ++++--
modules/gui/macosx/embeddedwindow.m | 10 +++++-----
modules/gui/macosx/misc.m | 26 +++++++++++++++++---------
3 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/extras/MacOSX/vlc.xcodeproj/project.pbxproj b/extras/MacOSX/vlc.xcodeproj/project.pbxproj
index d3e045a..7284206 100644
--- a/extras/MacOSX/vlc.xcodeproj/project.pbxproj
+++ b/extras/MacOSX/vlc.xcodeproj/project.pbxproj
@@ -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 */,
);
diff --git a/modules/gui/macosx/embeddedwindow.m b/modules/gui/macosx/embeddedwindow.m
index 3bb1ea9..ab712f8 100644
--- a/modules/gui/macosx/embeddedwindow.m
+++ b/modules/gui/macosx/embeddedwindow.m
@@ -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,8 +174,8 @@
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,8 +216,8 @@
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];
[o_temp_view setFrame:[o_view frame]];
diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index 68d5c2e..f5558e7 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -1,10 +1,11 @@
/*****************************************************************************
* 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 at 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
@@ -101,11 +103,15 @@ static NSMutableArray *blackoutWindows = NULL;
backing: NSBackingStoreBuffered defer: NO screen: screen];
[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
More information about the vlc-devel
mailing list