summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChidambar Zinnoury <chidambar.zinnoury@zefla.fr>2016-07-23 10:14:02 +0200
committerChidambar Zinnoury <chidambar.zinnoury@zefla.fr>2016-07-23 10:14:02 +0200
commit0909d99f47f49dda9313ea58454c0d507c914064 (patch)
treeda555115583e2e393569bdee690fd0bbcf56683e
parenta99b10a6b633cbc38e880bebc13bfd3487b93b41 (diff)
downloadenlightenment-devs/illogict/signals_priority.tar.gz
e: Continue the process according to the stopped state and not the setting.devs/illogict/signals_priority
The user may change the client’s signals priority setting while it is stopped, which would not restart it. We may as well also always change the actual priority.
-rw-r--r--src/bin/e_client.h1
-rw-r--r--src/bin/e_comp_x.c30
2 files changed, 15 insertions, 16 deletions
diff --git a/src/bin/e_client.h b/src/bin/e_client.h
index 41f68464e6..5849d8eabb 100644
--- a/src/bin/e_client.h
+++ b/src/bin/e_client.h
@@ -704,6 +704,7 @@ struct E_Client
Eina_Bool on_post_updates : 1; // client is on the post update list
Eina_Bool signals_priority : 1; // send sigstop/sigcont on focus out/in instead of niceing
+ Eina_Bool stopped : 1; // if signals priority is enabled, and the client stopped
};
#define e_client_focus_policy_click(ec) \
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index bac3da30fb..144cae45bd 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -871,17 +871,16 @@ _e_comp_x_client_pri_raise(E_Client *ec)
if (ec->netwm.pid <= 0) return;
if (ec->netwm.pid == getpid()) return;
- if (!ec->signals_priority)
- {
- _pri_adj(ec->netwm.pid,
- e_config->priority - 1, -1, EINA_FALSE,
-// EINA_TRUE, EINA_TRUE);
- EINA_TRUE, EINA_FALSE);
- }
- else
+ if (ec->stopped)
{
kill(ec->netwm.pid, SIGCONT);
+ ec->stopped = EINA_FALSE;
}
+
+ _pri_adj(ec->netwm.pid,
+ e_config->priority - 1, -1, EINA_FALSE,
+// EINA_TRUE, EINA_TRUE);
+ EINA_TRUE, EINA_FALSE);
// printf("WIN: pid %i, title %s (HI!!!!!!!!!!!!!!!!!!)\n",
// ec->netwm.pid, e_client_util_name_get(ec));
}
@@ -892,16 +891,15 @@ _e_comp_x_client_pri_norm(E_Client *ec)
if (ec->netwm.pid <= 0) return;
if (ec->netwm.pid == getpid()) return;
- if (!ec->signals_priority)
- {
- _pri_adj(ec->netwm.pid,
- e_config->priority, 1, EINA_FALSE,
-// EINA_TRUE, EINA_TRUE);
- EINA_TRUE, EINA_FALSE);
- }
- else
+ _pri_adj(ec->netwm.pid,
+ e_config->priority, 1, EINA_FALSE,
+// EINA_TRUE, EINA_TRUE);
+ EINA_TRUE, EINA_FALSE);
+
+ if (ec->signals_priority)
{
kill(ec->netwm.pid, SIGSTOP);
+ ec->stopped = EINA_TRUE;
}
// printf("WIN: pid %i, title %s (NORMAL)\n",
// ec->netwm.pid, e_client_util_name_get(ec));