]> git.sesse.net Git - vlc/commitdiff
Fix --qt-start-mninimized option
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 17 May 2009 23:31:58 +0000 (01:31 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 17 May 2009 23:31:58 +0000 (01:31 +0200)
Report : http://forum.videolan.org/viewtopic.php?f=13&t=59425&p=198466#p198450

modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp

index 8baf686df71f3ebcf5fddb614bf7fd8338086109..0bde8ff48183de77858407a11509becbe32228ca 100644 (file)
@@ -84,6 +84,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     cryptedLabel         = NULL;
     controls             = NULL;
     inputC               = NULL;
+    b_shouldHide         = false;
 
     bgWasVisible         = false;
     i_bg_height          = 0;
@@ -265,7 +266,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     /* Final sizing and showing */
     setMinimumWidth( __MAX( controls->sizeHint().width(),
                             menuBar()->sizeHint().width() ) );
-    show();
+    setVisible( !b_shouldHide );
 
     /* And switch to minimal view if needed
        Must be called after the show() */
@@ -462,7 +463,7 @@ inline void MainInterface::initSystray()
         if( b_systrayAvailable )
         {
             b_systrayWanted = true;
-            hide();
+            b_shouldHide = true;
         }
         else
             msg_Err( p_intf, "cannot start minimized without system tray bar" );
index 2f74e238f95403358bfd9d17e904276a998d60a2..d522a8b7ae7719e85745307e42e66c9a31cf7fce 100644 (file)
@@ -144,6 +144,7 @@ private:
     pl_dock_e            i_pl_dock;
     bool                 isDocked() { return ( i_pl_dock != PL_UNDOCKED ); }
     int                  i_bg_height;         ///< Save height of bgWidget
+    bool                 b_shouldHide;
 
     /* Status Bar */
     QLabel              *nameLabel;