summaryrefslogtreecommitdiff
path: root/src/procactions.cpp
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-19 00:35:27 +0100
committerinfirit <[email protected]>2014-12-19 00:35:27 +0100
commit51357cc58ed32763b7eaff97d9ba04507ac0665d (patch)
treed8edd30bdff48a0f9aa75d9c2c6c45ad6e5ee710 /src/procactions.cpp
parentee379181d3b6b89c23a660d027caa9c2d027aa7d (diff)
downloadmate-system-monitor-51357cc58ed32763b7eaff97d9ba04507ac0665d.tar.bz2
mate-system-monitor-51357cc58ed32763b7eaff97d9ba04507ac0665d.tar.xz
Disable priority changed handler while setting current priority
Taken from GSM commit: c00d94f3bfe2186428ef30e922042a555b7dc03a From: Robert Roth <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=667227
Diffstat (limited to 'src/procactions.cpp')
-rw-r--r--src/procactions.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/procactions.cpp b/src/procactions.cpp
index a8f3d61..2e71510 100644
--- a/src/procactions.cpp
+++ b/src/procactions.cpp
@@ -47,7 +47,8 @@ renice_single_process (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter
if (!info)
return;
-
+ if (info->nice == args->nice_value)
+ return;
error = setpriority (PRIO_PROCESS, info->pid, args->nice_value);
/* success */