# HG changeset patch # User giacomo # Date 1175547299 25200 # Node ID 5aaf6c282617d4ff84f46d7e0fe2b1cae3d655f6 # Parent cb0bb8e6d6e9e5459f87ac9eb2e7380d05636f29 [svn] rootvis: do not call cleanup routines if the plugin was not initted diff -r cb0bb8e6d6e9 -r 5aaf6c282617 ChangeLog --- a/ChangeLog Mon Apr 02 10:35:45 2007 -0700 +++ b/ChangeLog Mon Apr 02 13:54:59 2007 -0700 @@ -1,3 +1,10 @@ +2007-04-02 17:35:45 +0000 Giacomo Lozito + revision [1918] + - aosd: added function to detect if a composite manager is active for a certain screen; this is not used for now, cause the _NET_WM_CM_Sn hint is pretty new; it will certainly prove useful at some time + trunk/src/aosd/ghosd.c | 27 ++++++++++++++++++++++++--- + 1 file changed, 24 insertions(+), 3 deletions(-) + + 2007-04-02 11:03:06 +0000 Giacomo Lozito revision [1916] aosd: added compile option in configure for composite support; this way, if support is compiled in, we can safely check if the composite module is loaded diff -r cb0bb8e6d6e9 -r 5aaf6c282617 src/rootvis/rootvis.c --- a/src/rootvis/rootvis.c Mon Apr 02 10:35:45 2007 -0700 +++ b/src/rootvis/rootvis.c Mon Apr 02 13:54:59 2007 -0700 @@ -19,6 +19,8 @@ static void rootvis_playback_stop(void); static void rootvis_render_freq(gint16 freq_data[2][256]); +static gboolean plugin_is_initted = FALSE; + // Callback functions VisPlugin rootvis_vtable = { 0, // Handle, filled in by xmms @@ -409,14 +411,19 @@ fprintf(stderr, "Thread creation failed: %d\n", rc1); error_exit("Thread creation failed"); } + plugin_is_initted = TRUE; } static void rootvis_cleanup(void) { - print_status("Cleanup... "); - threads.control = STOP; - pthread_join(threads.worker[0], NULL); - if (conf.stereo) pthread_join(threads.worker[1], NULL); - print_status("Clean Exit"); + if ( plugin_is_initted ) + { + print_status("Cleanup... "); + threads.control = STOP; + pthread_join(threads.worker[0], NULL); + if (conf.stereo) pthread_join(threads.worker[1], NULL); + print_status("Clean Exit"); + plugin_is_initted = FALSE; + } } static void rootvis_about(void)