next step in external themes
[livewp] / applet / src / livewp-scene.c
index f03eb29..24b25df 100644 (file)
@@ -173,11 +173,22 @@ init_scene_External(AWallpaperPlugin *desktop_plugin){
     //fprintf(stderr,"init_scene_Xsnow\n");
     char* child_argv[2048];
     char *run_string = NULL;
+    gchar *exec_path = NULL,
+        *window_id = NULL;
     if (!desktop_plugin->priv->visible)
         return;
-    run_string = g_strdup_printf("%s -window-id %d", desktop_plugin->priv->exec_path, 
-                                GDK_WINDOW_XID(desktop_plugin->priv->window->window));
     
+    exec_path = g_strdup(g_hash_table_lookup(desktop_plugin->priv->hash_theme, "exec_path"));
+    window_id = g_strdup(g_hash_table_lookup(desktop_plugin->priv->hash_theme, "window_id"));
+    if (!exec_path) 
+        return;
+    if (window_id){
+        run_string = g_strdup_printf("%s %s %d", exec_path, window_id,
+                                GDK_WINDOW_XID(desktop_plugin->priv->window->window));
+    }else {
+        run_string = g_strdup_printf("%s", exec_path);
+    }    
+    fprintf(stderr, "runs string = %s\n", run_string);
     parsestring(run_string, child_argv);
 
     desktop_plugin->priv->running = TRUE;