macosx: properly store video-on-top state in playlist variable
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Thu, 24 Apr 2014 19:35:15 +0000 (21:35 +0200)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Thu, 24 Apr 2014 19:35:15 +0000 (21:35 +0200)
Previous code was never called for fullscreen and video-on-top.

close #9999

modules/gui/macosx/MainMenu.m

index baa83d2..8c21735 100644 (file)
@@ -907,7 +907,9 @@ static VLCMainMenu *_o_sharedInstance = nil;
     if (p_input) {
         vout_thread_t *p_vout = getVoutForActiveWindow();
         if (p_vout) {
-            var_ToggleBool(p_vout, "video-on-top");
+            BOOL b_fs = var_ToggleBool(p_vout, "video-on-top");
+            var_SetBool(pl_Get(p_intf), "video-on-top", b_fs);
+
             vlc_object_release(p_vout);
         }
         vlc_object_release(p_input);
@@ -1478,10 +1480,6 @@ static VLCMainMenu *_o_sharedInstance = nil;
     assert([data isKindOfClass:[VLCAutoGeneratedMenuContent class]]);
     VLCAutoGeneratedMenuContent *menuContent = (VLCAutoGeneratedMenuContent *)data;
 
-    /* Preserve settings across vouts via the playlist object: */
-    if (!strcmp([menuContent name], "fullscreen") || !strcmp([menuContent name], "video-on-top"))
-        var_Set(pl_Get(VLCIntf), [menuContent name] , [menuContent value]);
-
     p_object = [menuContent vlcObject];
 
     if (p_object != NULL) {