diff options
-rw-r--r-- | src/bin/e_client.h | 1 | ||||
-rw-r--r-- | src/bin/e_comp_x.c | 30 |
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)); |