summaryrefslogtreecommitdiffstats
path: root/ProcessList.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2012-03-30 01:20:32 +0000
committerHisham Muhammad <hisham@gobolinux.org>2012-03-30 01:20:32 +0000
commit05a78c8111844dafaf8aea329c2b047bffa7f898 (patch)
tree34a353268ebc603cc59a7f3e5384ddfe7e017464 /ProcessList.c
parentbca656c79e184fb044ad9f71c323070d25623486 (diff)
Auto-follow process when selecting which signal to use when killing a process.
This avoids killing the wrong process.
Diffstat (limited to 'ProcessList.c')
-rw-r--r--ProcessList.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ProcessList.c b/ProcessList.c
index 1f47408b..e02e5f8c 100644
--- a/ProcessList.c
+++ b/ProcessList.c
@@ -236,6 +236,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable) {
this->detailedCPUTime = false;
this->countCPUsFromZero = false;
this->treeStr = NULL;
+ this->following = -1;
return this;
}
@@ -915,7 +916,7 @@ void ProcessList_rebuildPanel(ProcessList* this, bool flags, int following, bool
}
int currPos = Panel_getSelectedIndex(this->panel);
- pid_t currPid = following ? following : 0;
+ pid_t currPid = following != -1 ? following : 0;
int currScrollV = this->panel->scrollV;
Panel_prune(this->panel);

© 2014-2024 Faster IT GmbH | imprint | privacy policy