summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortest-tools <test-tools>2006-10-12 11:41:13 +0000
committertest-tools <test-tools>2006-10-12 11:41:13 +0000
commita99d3eefd7ca48574d3f310031d2179f336d9583 (patch)
tree24b797145f8a7d041e3f9c93ab6e9ff98e1127a8 /src
parent40bf9a94ba6cde2397e71dde5ea68bb993e277ba (diff)
downloadberyl-manager-a99d3eefd7ca48574d3f310031d2179f336d9583.tar.gz
beryl-manager-a99d3eefd7ca48574d3f310031d2179f336d9583.tar.bz2
beryl-manager: Don't give warnings, if no Windowmanager killed.
also, don't quit on warnings..
Diffstat (limited to 'src')
-rw-r--r--src/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index bcf07a9..306751d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -122,6 +122,9 @@ void beryl_manager_log_handler (const gchar *log_domain,
{
g_log_default_handler (log_domain, log_level, message, user_data);
+ if (log_level <= G_LOG_LEVEL_WARNING)
+ return;
+
if (isatty(0))
g_on_error_query (NULL);
else
@@ -342,6 +345,8 @@ void freeXLS(XLSItem * i, gpointer p)
}
void killWM()
{
+ gint killed = 0;
+
if (!g_mutex_trylock(mutx))
return;
{
@@ -394,7 +399,8 @@ void killWM()
if (strcmp(cp+8,md)==0)
{
//on same display, go ahead kill
- kill(pid,SIGTERM);
+ if (kill(pid,SIGTERM)!=-1)
+ killed++;
}
}
}
@@ -416,7 +422,7 @@ void killWM()
Window w=XGetSelectionOwner(d,wmAtom);
if (w!=None)
XKillClient(d,w);
- else
+ else if (killed)
{
gchar * cli;
GSList * xls;