case 3: child_argv[1] = "4";
break;
}
-
- desktop_plugin->priv->pid = fork();
- if (desktop_plugin->priv->pid == 0){
- execvp("/usr/bin/livewp", child_argv);
- fprintf(stderr,"Problem with new process");
+ desktop_plugin->priv->one_in_all_view = get_one_in_all_views_from_config();
+ /* Check one theme in all view mode */
+ if (!desktop_plugin->priv->one_in_all_view ||
+ (desktop_plugin->priv->one_in_all_view && id == 0)){
+ /* Start a new process */
+ desktop_plugin->priv->pid = fork();
+ if (desktop_plugin->priv->pid == 0){
+ execvp("/usr/bin/livewp", child_argv);
+ fprintf(stderr,"Problem with new process");
+ }
}
desktop_plugin_visible_notify((GObject *)widget, NULL, desktop_plugin);
g_object_get (object, "is-on-current-desktop", &visible, NULL);
/* fprintf (stderr, "is-on-current-desktop changed. visible: %u", visible); */
if (priv){
- /*
- if (visible){
- send_dbus_signal (priv, LIVEWP_SIGNAL_INTERFACE,
- LIVEWP_SIGNAL_PATH, LIVEWP_PLAY_LIVEBG_ON_VIEW);
- }else{
+ if (priv->one_in_all_view){
+ if (visible)
send_dbus_signal (priv, LIVEWP_SIGNAL_INTERFACE,
- LIVEWP_SIGNAL_PATH, LIVEWP_PAUSE_LIVEBG_ON_VIEW);
- }
- */
-
+ LIVEWP_SIGNAL_PATH, LIVEWP_PLAY_LIVEBG_ON_VIEW1);
+ else{
+ /* start any application on current view */
+ if ((priv->view + 1) == current_active_view())
+ send_dbus_signal (priv, LIVEWP_SIGNAL_INTERFACE,
+ LIVEWP_SIGNAL_PATH, LIVEWP_PAUSE_LIVEBG_ON_VIEW1);
+ }
+ return;
+ }
switch (priv->view + 1){
case 1: if (visible)
send_dbus_signal (priv, LIVEWP_SIGNAL_INTERFACE,
LIVEWP_SIGNAL_PATH, LIVEWP_PAUSE_LIVEBG_ON_VIEW4);
break;
}
+
}
}