]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/main_interface.cpp
[Qt] Fix small glitches, issues, because of previous commits.
[vlc] / modules / gui / qt4 / main_interface.cpp
index 9915cdf8b0ff3987be07a8f7365d50a27051cd8f..0cd62dca11885da08b23b067c98222645c602ecc 100644 (file)
@@ -152,8 +152,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
      **************************/
     /* Connect the input manager to the GUI elements it manages */
 
-    /* It is also connected to the control->slider, see the ControlsWidget */
-    /* Change the SpeedRate in the Status */
+    /* Change the SpeedRate in the Status Bar */
     CONNECT( THEMIM->getIM(), rateChanged( int ), this, setRate( int ) );
 
     /**
@@ -206,8 +205,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
 
 
     /* VideoWidget connects to avoid different threads speaking to each other */
-    CONNECT( this, askReleaseVideo( void ),
-             this, releaseVideoSlot( void ) );
+    CONNECT( this, askReleaseVideo( void ),
+             this, releaseVideoSlot( void ) );
     if( videoWidget )
         CONNECT( this, askVideoToResize( unsigned int, unsigned int ),
                  videoWidget, SetSizing( unsigned int, unsigned int ) );
@@ -376,12 +375,14 @@ void MainInterface::handleMainUi( QSettings *settings )
 
     /* Create the CONTROLS Widget */
     controls = new ControlsWidget( p_intf,
-                   settings->value( "adv-controls", false ).toBool() );
+                   settings->value( "adv-controls", false ).toBool(), this );
     CONNECT( controls, advancedControlsToggled( bool ),
              this, doComponentsUpdate() );
+    InputControlsWidget *inputC = new InputControlsWidget( p_intf, this );
 
     /* Add the controls Widget to the main Widget */
     mainLayout->insertWidget( 0, controls, 0, Qt::AlignBottom );
+    mainLayout->insertWidget( 0, inputC, 0, Qt::AlignBottom );
 
     /* Create the Speed Control Widget */
     speedControl = new SpeedControlWidget( p_intf );
@@ -650,17 +651,16 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
 }
 
 /* Call from the WindowClose function */
-void MainInterface::releaseVideo( void *p_win )
+void MainInterface::releaseVideo( void )
 {
     if( fullscreenControls ) fullscreenControls->detachVout();
-    if( p_win )
-        emit askReleaseVideo( p_win );
+    emit askReleaseVideo( );
 }
 
 /* Function that is CONNECTED to the previous emit */
-void MainInterface::releaseVideoSlot( void *p_win )
+void MainInterface::releaseVideoSlot( void )
 {
-    videoWidget->release( p_win );
+    videoWidget->release( );
 
     if( bgWasVisible )
     {
@@ -774,7 +774,7 @@ void MainInterface::toggleMinimalView()
     if( i_visualmode != QT_ALWAYS_VIDEO_MODE &&
         i_visualmode != QT_MINIMAL_MODE )
     { /* NORMAL MODE then */
-        if( videoWidget->isHidden() ) emit askBgWidgetToToggle();
+        if( !videoWidget || videoWidget->isHidden() ) emit askBgWidgetToToggle();
         else
         {
             /* If video is visible, then toggle the status of bgWidget */
@@ -927,12 +927,15 @@ void MainInterface::toggleUpdateSystrayMenu()
         /* Visible */
 #ifdef WIN32
         /* check if any visible window is above vlc in the z-order,
-         * but ignore the ones always on top */
+         * but ignore the ones always on top
+         * and the ones which can't be activated */
         WINDOWINFO wi;
         HWND hwnd;
         wi.cbSize = sizeof( WINDOWINFO );
         for( hwnd = GetNextWindow( internalWinId(), GW_HWNDPREV );
-                hwnd && !IsWindowVisible( hwnd );
+                hwnd && ( !IsWindowVisible( hwnd ) ||
+                    ( GetWindowInfo( hwnd, &wi ) &&
+                      (wi.dwExStyle&WS_EX_NOACTIVATE) ) );
                 hwnd = GetNextWindow( hwnd, GW_HWNDPREV ) );
         if( !hwnd || !GetWindowInfo( hwnd, &wi ) ||
                 (wi.dwExStyle&WS_EX_TOPMOST) )