From: Rafaël Carré Date: Fri, 31 Aug 2007 10:44:43 +0000 (+0000) Subject: Unblocks SIGCHLD in qt4 thread X-Git-Tag: 0.9.0-test0~6024 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=8fd71e10c143907dac7dd917008f889fed51f32b;p=vlc Unblocks SIGCHLD in qt4 thread --- diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp index c2447f43cc..3f61acf9c9 100644 --- a/modules/gui/qt4/menus.cpp +++ b/modules/gui/qt4/menus.cpp @@ -22,10 +22,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#ifndef WIN32 -# include -#endif - #include #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 ) { diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 0bff00f399..10bc4b7149 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -21,6 +21,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ +#ifndef WIN32 +# include +#endif + #include #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 )