]> git.sesse.net Git - vlc/commitdiff
* fspanel usability fixes (forward-port of [18077]) plus some further clean up
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 26 Nov 2006 19:43:20 +0000 (19:43 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 26 Nov 2006 19:43:20 +0000 (19:43 +0000)
modules/gui/macosx/equalizer.m
modules/gui/macosx/fspanel.h
modules/gui/macosx/vout.m

index 2e01f15ddc71ffd7dbfb47b4f445915ffdd85c96..b816a3a63761fd1617548722b5b66a5410670e99 100644 (file)
@@ -177,7 +177,7 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
     char *psz_bands, *psz_bands_init, *p_next;
     vlc_bool_t b_2p;
     int i;
-    vlc_bool_t b_enabled = GetFiltersStatus( p_intf, "equalizer" );
+    vlc_bool_t b_enabled = GetFiltersStatus( p_intf, (char *)"equalizer" );
     vlc_object_t *p_object = vlc_object_find( p_intf,
                                 VLC_OBJECT_AOUT, FIND_ANYWHERE );
 
@@ -320,7 +320,7 @@ static vlc_bool_t GetFiltersStatus( intf_thread_t *p_intf,
 
 - (IBAction)enable:(id)sender
 {
-    ChangeFiltersString( VLCIntf, "equalizer", [sender state] );
+    ChangeFiltersString( VLCIntf, (char *)"equalizer", [sender state] );
 }
 
 - (IBAction)preampSliderUpdated:(id)sender
index 1fb5441806efbab7b6930b98b3daa4c781b67f7b..31bfe25ff4a6c62e76a0b31bf89a5ddb50db55bd 100644 (file)
@@ -30,6 +30,9 @@
     BOOL b_keptVisible;\r
     BOOL b_alreadyCounting;\r
     int i_timeToKeepVisibleInSec;\r
+\r
+    BOOL b_displayed;\r
+    BOOL b_voutWasUpdated;\r
 }\r
 - (id)initWithContentRect: (NSRect)contentRect \r
                 styleMask: (unsigned int)aStyle \r
@@ -61,6 +64,8 @@
 - (void)mouseDown:(NSEvent *)theEvent;\r
 - (void)mouseDragged:(NSEvent *)theEvent;\r
 \r
+- (BOOL)isDisplayed;\r
+- (void)setVoutWasUpdated;\r
 @end\r
 \r
 @interface VLCFSPanelView : NSView\r
index 87cbb5f83a5d1057816ceb3b27045af0f3210c1f..bdf9d5ab26f79b38fd2bebb8f6c53ce65db3912c 100644 (file)
@@ -668,7 +668,6 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
     vlc_value_t value_drawable;
     int i_timeout;
     id o_return = nil;
-    vout_thread_t * p_real_vout = [VLCVoutView getRealVout: p_vout];
 
     var_Get( p_vout->p_libvlc, "drawable", &value_drawable );
 
@@ -947,6 +946,14 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable,
 
     if( p_vout->b_fullscreen )
     {
+        /* move the FSPanel to front in case that it is currently shown
+         * this won't and is not supposed to work when it's fading right now */
+        if( [[[[VLCMain sharedInstance] getControls] getFSPanel] isDisplayed] )
+            [[[[VLCMain sharedInstance] getControls] getFSPanel] orderFront: self];
+        
+        /* tell the fspanel to move itself to front next time it's triggered */
+        [[[[VLCMain sharedInstance] getControls] getFSPanel] setVoutWasUpdated];
+
         CGDisplayFadeReservationToken token;
         NSRect screen_rect = [o_screen frame];
         screen_rect.origin.x = screen_rect.origin.y = 0;