]> git.sesse.net Git - vlc/commitdiff
Unblocks SIGCHLD in qt4 thread
authorRafaël Carré <funman@videolan.org>
Fri, 31 Aug 2007 10:44:43 +0000 (10:44 +0000)
committerRafaël Carré <funman@videolan.org>
Fri, 31 Aug 2007 10:44:43 +0000 (10:44 +0000)
modules/gui/qt4/menus.cpp
modules/gui/qt4/qt4.cpp

index c2447f43cc89417425919f1061d4d948bc72e8ff..3f61acf9c9ad95af6f418cf003743de983a47fda 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifndef WIN32
-#   include <signal.h>
-#endif
-
 #include <vlc_intf_strings.h>
 
 #include "main_interface.hpp"
@@ -171,20 +167,7 @@ void QVLCMenu::createMenuBar( MainInterface *mi, intf_thread_t *p_intf,
         bool playlist, bool adv_controls_enabled,
         bool visual_selector_enabled )
 {
-#ifndef WIN32
-    /* Ugly klugde
-     * Remove SIGCHLD from the ignored signal the time to initialise
-     * Qt because it call gconf to get the icon theme */
-    sigset_t set;
-
-    sigemptyset( &set );
-    sigaddset( &set, SIGCHLD );
-    pthread_sigmask( SIG_UNBLOCK, &set, NULL );
-#endif /* WIN32 */
     QMenuBar *bar = mi->menuBar();
-#ifndef WIN32
-    pthread_sigmask( SIG_BLOCK, &set, NULL );
-#endif /* WIN32 */
     BAR_ADD( FileMenu(), qtr("&Media") );
     if( playlist )
     {
index 0bff00f3997fdf6891a31aa829b3be7d6248a12c..10bc4b7149b8c55d5b742bae1b6a6b0c69462a2c 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#ifndef WIN32
+#   include <signal.h>
+#endif
+
 #include <QApplication>
 
 #include "qt4.hpp"
@@ -209,7 +213,19 @@ static void Init( intf_thread_t *p_intf )
     }
 
     if( p_intf->pf_show_dialog )
+    {
         vlc_thread_ready( p_intf );
+#ifndef WIN32
+        /* unblocks SIGCHLD as that makes the app hang
+         * when cleanlooks style is used with QT4 
+         * ( exactly when launching gconftool-2 to get the icon theme ) */
+        sigset_t set;
+
+        sigemptyset( &set );
+        sigaddset( &set, SIGCHLD );
+        pthread_sigmask( SIG_UNBLOCK, &set, NULL );
+#endif
+    }
 
     /* Start playing if needed */
     if( !p_intf->pf_show_dialog && p_intf->b_play )