summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcyberorg <cyberorg>2006-11-07 12:53:00 +0000
committercyberorg <cyberorg>2006-11-07 12:53:00 +0000
commit70dbdaa38e80e9c7a5bdc71c76c0cdff93bb9434 (patch)
treec73d072702470a622d8fde62882e20cd284a4326 /src
parentf5f6867a3f28a61509ee69be27334539fcdef0dd (diff)
downloadberyl-manager-70dbdaa38e80e9c7a5bdc71c76c0cdff93bb9434.tar.gz
beryl-manager-70dbdaa38e80e9c7a5bdc71c76c0cdff93bb9434.tar.bz2
beryl-manager: emerald starting twice fix by freakabcd
Diffstat (limited to 'src')
-rw-r--r--src/main.c50
1 files changed, 28 insertions, 22 deletions
diff --git a/src/main.c b/src/main.c
index 6395ddf..5044e52 100644
--- a/src/main.c
+++ b/src/main.c
@@ -374,37 +374,43 @@ gboolean berylSignalled(gint signal)
gpointer decorThread(gpointer d)
{
gint ex=0;
- decoratorLaunched=TRUE;
- while(decoratorLaunched)
+ gchar *s=NULL;
+
+ if(decoratorLaunched && !reloadingDecorator)
+ return NULL;
+
+ decoratorLaunched = FALSE;
+ s = g_strconcat(DMs[DM].Prog," --replace",NULL);
+ do
{
- gchar * s = g_strconcat(DMs[DM].Prog," --replace",NULL);
- if (!g_spawn_command_line_sync(s,NULL,NULL,&ex,NULL))
- {
- g_warning(_("Couldn't launch selected decorator:%s"),DMs[DM].Name);
- decoratorLaunched=FALSE;
- }
- else if (reloadingDecorator)
+ if(g_spawn_command_line_sync(s,NULL,NULL,&ex,NULL))
{
- g_free(s);
- reloadingDecorator=FALSE;
- return NULL;
+ decoratorLaunched = TRUE;
+ if(reloadingDecorator)
+ reloadingDecorator = FALSE;
}
- else if (WIFEXITED(ex)) // returned something
+ else
{
- if (WEXITSTATUS(ex)) // returned something other than 0
+ g_warning(_("Couldn't launch selected decorator:%s"),DMs[DM].Name);
+ if(WIFEXITED(ex)) // returned something
{
- decoratorLaunched=FALSE;
+ g_warning(_("decorator %s returned unsuccessfully"),DMs[DM].Name);
+ if(WEXITSTATUS(ex)) // returned something other than 0
+ {
+ g_warning(_("decorator %s returned with non-zero status"),DMs[DM].Name);
+ }
}
- }
- else if (WIFSIGNALED(ex)) // killed by a signal
- {
- if (!decoratorSignalled(WTERMSIG(ex)))
+ else if(WIFSIGNALED(ex))
{
- decoratorLaunched=FALSE;
+ g_warning(_("decorator %s was killed by a signal"),DMs[DM].Name);
+ if(!decoratorSignalled(WTERMSIG(ex)))
+ {
+ }
}
}
- g_free(s);
- }
+ }while(!decoratorLaunched);
+
+ g_free(s);
return NULL;
}
void killIfWM(XLSItem * i, Display * d)