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)
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 41f68464e..5849d8eab 100644
--- a/src/bin/e_client.h
+++ b/src/bin/e_client.h
@@ -704,6 +704,7 @@ struct E_Client
704 704
705 Eina_Bool on_post_updates : 1; // client is on the post update list 705 Eina_Bool on_post_updates : 1; // client is on the post update list
706 Eina_Bool signals_priority : 1; // send sigstop/sigcont on focus out/in instead of niceing 706 Eina_Bool signals_priority : 1; // send sigstop/sigcont on focus out/in instead of niceing
707 Eina_Bool stopped : 1; // if signals priority is enabled, and the client stopped
707}; 708};
708 709
709#define e_client_focus_policy_click(ec) \ 710#define e_client_focus_policy_click(ec) \
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index bac3da30f..144cae45b 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)
871 if (ec->netwm.pid <= 0) return; 871 if (ec->netwm.pid <= 0) return;
872 if (ec->netwm.pid == getpid()) return; 872 if (ec->netwm.pid == getpid()) return;
873 873
874 if (!ec->signals_priority) 874 if (ec->stopped)
875 {
876 _pri_adj(ec->netwm.pid,
877 e_config->priority - 1, -1, EINA_FALSE,
878// EINA_TRUE, EINA_TRUE);
879 EINA_TRUE, EINA_FALSE);
880 }
881 else
882 { 875 {
883 kill(ec->netwm.pid, SIGCONT); 876 kill(ec->netwm.pid, SIGCONT);
877 ec->stopped = EINA_FALSE;
884 } 878 }
879
880 _pri_adj(ec->netwm.pid,
881 e_config->priority - 1, -1, EINA_FALSE,
882// EINA_TRUE, EINA_TRUE);
883 EINA_TRUE, EINA_FALSE);
885// printf("WIN: pid %i, title %s (HI!!!!!!!!!!!!!!!!!!)\n", 884// printf("WIN: pid %i, title %s (HI!!!!!!!!!!!!!!!!!!)\n",
886// ec->netwm.pid, e_client_util_name_get(ec)); 885// ec->netwm.pid, e_client_util_name_get(ec));
887} 886}
@@ -892,16 +891,15 @@ _e_comp_x_client_pri_norm(E_Client *ec)
892 if (ec->netwm.pid <= 0) return; 891 if (ec->netwm.pid <= 0) return;
893 if (ec->netwm.pid == getpid()) return; 892 if (ec->netwm.pid == getpid()) return;
894 893
895 if (!ec->signals_priority) 894 _pri_adj(ec->netwm.pid,
896 { 895 e_config->priority, 1, EINA_FALSE,
897 _pri_adj(ec->netwm.pid, 896// EINA_TRUE, EINA_TRUE);
898 e_config->priority, 1, EINA_FALSE, 897 EINA_TRUE, EINA_FALSE);
899// EINA_TRUE, EINA_TRUE); 898
900 EINA_TRUE, EINA_FALSE); 899 if (ec->signals_priority)
901 }
902 else
903 { 900 {
904 kill(ec->netwm.pid, SIGSTOP); 901 kill(ec->netwm.pid, SIGSTOP);
902 ec->stopped = EINA_TRUE;
905 } 903 }
906// printf("WIN: pid %i, title %s (NORMAL)\n", 904// printf("WIN: pid %i, title %s (NORMAL)\n",
907// ec->netwm.pid, e_client_util_name_get(ec)); 905// ec->netwm.pid, e_client_util_name_get(ec));