tuned kill and start of xsnow and other themes
authorVlad <vlad@gas.by>
Fri, 30 Jul 2010 08:49:33 +0000 (11:49 +0300)
committerVlad <vlad@gas.by>
Fri, 30 Jul 2010 08:49:33 +0000 (11:49 +0300)
applet/src/livewp-main.c
applet/src/livewp-scene.c

index 2cbd87a..34c7130 100644 (file)
@@ -139,9 +139,6 @@ quit_from_program (Animation_WallpaperPrivate *priv)
                    priv->short_timer = 0;
             }
             destroy_scene(priv->desktop_plugin);
-         if (priv->podpid > 1)
-             kill (priv->podpid, SIGTERM);
-
          osso_deinitialize(priv->osso);
          g_hash_table_destroy(priv->hash_scene_func);
          g_free(priv->desktop_plugin);
@@ -210,17 +207,19 @@ main(int argc, char *argv[])
     priv->window = main_widget;
     fprintf(stderr,"XWINDOW %i\n",GDK_WINDOW_XID (main_widget->window));
     priv->desktop_plugin = desktop_plugin;
-
     priv->view = view;
+
+    if (current_active_view() == view) 
+        priv->visible = TRUE;
+    else 
+        priv->visible = FALSE;
+
     /* Load config */
     read_config(priv);
+
     /* Initialize DBUS */
     livewp_initialize_dbus(priv);
     set_live_bg(GDK_WINDOW_XDISPLAY (main_widget->window), GDK_WINDOW_XID (main_widget->window), view);
-    if (current_active_view() == view) 
-        priv->visible = TRUE;
-    else 
-        priv->visible = FALSE;
     
     priv->view_notify = 0; 
     fprintf(stderr,"VISIBLE %i %i\n",priv->visible, current_active_view());
index e6d7d8d..e4a2c9c 100644 (file)
@@ -30,15 +30,15 @@ destroy_scene(AWallpaperPlugin *desktop_plugin)
     if (desktop_plugin->priv->scene){
            GSList * tmp = desktop_plugin->priv->scene->actors;
            while (tmp != NULL){
-               destroy_actor(tmp->data);
-               tmp = g_slist_next(tmp);
+                   destroy_actor(tmp->data);
+                   tmp = g_slist_next(tmp);
            }
            if (tmp)
-               g_slist_free(tmp);
+                   g_slist_free(tmp);
            desktop_plugin->priv->scene->actors = NULL;
            if (desktop_plugin->priv->scene){
-               g_free(desktop_plugin->priv->scene);
-               desktop_plugin->priv->scene = NULL;
+                   g_free(desktop_plugin->priv->scene);
+                   desktop_plugin->priv->scene = NULL;
            }
     }
     if (desktop_plugin->priv->pipeline){
@@ -46,6 +46,10 @@ destroy_scene(AWallpaperPlugin *desktop_plugin)
         gst_object_unref (GST_OBJECT (desktop_plugin->priv->pipeline));
 
     }
+    if (desktop_plugin->priv->podpid > 1){
+        kill (desktop_plugin->priv->podpid, SIGTERM);
+        desktop_plugin->priv->podpid = -1;
+    }
 }
 /*******************************************************************************/
 void