[vlc-commits] macosx: use video-wallpaper instead of macosx-background, and fix some small issue

David Fuhrmann git at videolan.org
Tue Sep 4 18:08:27 CEST 2012


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Mon Sep  3 15:03:57 2012 +0200| [083f13909cc377a8121d788dba4b79ddd4461ace] | committer: David Fuhrmann

macosx: use video-wallpaper instead of macosx-background, and fix some small issue

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=083f13909cc377a8121d788dba4b79ddd4461ace
---

 modules/gui/macosx/MainWindow.m |    6 +++---
 modules/gui/macosx/intf.m       |    2 +-
 modules/gui/macosx/macosx.m     |    4 ----
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index ae6d3ca..4df07f6 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -1804,8 +1804,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 - (void)setupVideoView
 {
-    // TODO: make lion fullscreen compatible with macosx-background and !embedded-video
-    if (var_InheritBool(VLCIntf, "macosx-background") && !b_nativeFullscreenMode) {
+    // TODO: make lion fullscreen compatible with video-wallpaper and !embedded-video
+    if (var_InheritBool(VLCIntf, "video-wallpaper") && !b_nativeFullscreenMode) {
         msg_Dbg(VLCIntf, "Creating background window");
         NSScreen *screen = [NSScreen screenWithDisplayID:(CGDirectDisplayID)var_InheritInteger(VLCIntf, "macosx-vdev")];
         if (!screen)
@@ -1971,7 +1971,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
 {
     nativeVideoSize = size;
 
-    if (var_InheritBool(VLCIntf, "macosx-video-autoresize") && !b_fullscreen && !var_InheritBool(VLCIntf, "macosx-background"))
+    if (var_InheritBool(VLCIntf, "macosx-video-autoresize") && !b_fullscreen && !var_InheritBool(VLCIntf, "video-wallpaper"))
         [self performSelectorOnMainThread:@selector(resizeWindow) withObject:nil waitUntilDone:NO];
 }
 
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 304f369..240a40d 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1371,7 +1371,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 
 - (void)setWindowLevel:(NSNumber*)state
 {
-    if (var_InheritBool(p_intf, "macosx-background"))
+    if (var_InheritBool(p_intf, "macosx-background") || [[[[VLCMainWindow sharedInstance] videoView] window] level] < NSNormalWindowLevel)
         return;
 
     if ([state unsignedIntValue] & VOUT_WINDOW_STATE_ABOVE)
diff --git a/modules/gui/macosx/macosx.m b/modules/gui/macosx/macosx.m
index c1d8139..a8b2247 100644
--- a/modules/gui/macosx/macosx.m
+++ b/modules/gui/macosx/macosx.m
@@ -116,9 +116,6 @@ void WindowClose  (vout_window_t *);
 #define PLAYMODEBUTTONS_TEXT N_("Show play mode control buttons")
 #define PLAYMODEBUTTONS_LONGTEXT N_("Shows the shuffle and repeat buttons in the main window")
 
-#define BACKGROUND_TEXT N_("Use as desktop background")
-#define BACKGROUND_LONGTEXT N_("Use the video as the desktop background.")
-
 vlc_module_begin ()
     set_description(N_("Mac OS X interface"))
     set_capability("interface", 200)
@@ -144,7 +141,6 @@ vlc_module_begin ()
     add_bool("macosx-icon-change", true, ICONCHANGE_TEXT, ICONCHANGE_LONGTEXT, true)
     add_bool("macosx-show-playback-buttons", false, JUMPBUTTONS_TEXT, JUMPBUTTONS_LONGTEXT, false)
     add_bool("macosx-show-playmode-buttons", true, PLAYMODEBUTTONS_TEXT, PLAYMODEBUTTONS_LONGTEXT, false)
-    add_bool("macosx-background", false, BACKGROUND_TEXT, BACKGROUND_LONGTEXT, false)
 
     add_submodule ()
         set_description("Mac OS X Video Output Provider")



More information about the vlc-commits mailing list