[vlc-commits] macosx: fix fullscreen set by vout only (e.g. over http interface)

David Fuhrmann git at videolan.org
Wed Jul 11 21:52:49 CEST 2012


vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Wed Jul 11 13:01:27 2012 +0200| [9731dc0a1394d74a560211cab0a30f354aac181e] | committer: Felix Paul Kühne

macosx: fix fullscreen set by vout only (e.g. over http interface)

close #7117
(cherry picked from commit 6b7c0c9fab5394dceaf483381ecd297a40947152)

Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=9731dc0a1394d74a560211cab0a30f354aac181e
---

 modules/gui/macosx/intf.h |    1 +
 modules/gui/macosx/intf.m |   13 +++++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h
index 7cae304..412d2ed 100644
--- a/modules/gui/macosx/intf.h
+++ b/modules/gui/macosx/intf.h
@@ -180,6 +180,7 @@ struct intf_sys_t
 - (unsigned int)VLCModifiersToCocoa:(NSString *)theString;
 - (void)updateCurrentlyUsedHotkeys;
 - (void)fullscreenChanged;
+- (void)checkFullscreenChange:(NSNumber *)o_full;
 - (void)PlaylistItemChanged;
 - (void)playbackStatusUpdated;
 - (void)sendDistributedNotificationWithUpdatedPlaybackStatus;
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 78c97ec..a06c93e 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -168,8 +168,8 @@ static int WindowControl( vout_window_t *p_wnd, int i_query, va_list args )
     else if( i_query == VOUT_WINDOW_SET_FULLSCREEN )
     {
         NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
-        // we already have our playlist "fullscreen" callback, do not repeat the same call here
-        //[[VLCMain sharedInstance] performSelectorOnMainThread:@selector(fullscreenChanged) withObject: nil waitUntilDone: NO];
+        int i_full = va_arg( args, int );
+        [[VLCMain sharedInstance] performSelectorOnMainThread:@selector(checkFullscreenChange:) withObject:[NSNumber numberWithInt: i_full] waitUntilDone:NO];
         [o_pool release];
     }
     else
@@ -1464,6 +1464,15 @@ unsigned int CocoaKeyToVLC( unichar i_key )
     }
 }
 
+- (void)checkFullscreenChange:(NSNumber *)o_full
+{
+    BOOL b_full = [o_full boolValue];    
+    if( p_intf && !var_GetBool( pl_Get( p_intf ), "fullscreen" ) != !b_full )
+    {
+        var_SetBool( pl_Get(p_intf), "fullscreen", b_full );        
+    }
+}
+
 - (void)PlaylistItemChanged
 {
     if( p_current_input && ( p_current_input->b_dead || !vlc_object_alive( p_current_input ) ))



More information about the vlc-commits mailing list