e: Continue the process according to the stopped state and not the setting.

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.
This commit is contained in:
Chidambar Zinnoury 2016-07-23 10:14:02 +02:00
parent a99b10a6b6
commit 0909d99f47
2 changed files with 15 additions and 16 deletions

View File

@ -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) \

View File

@ -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));