summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-09-12 17:10:34 -0600
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2017-04-01 14:45:29 +0300
commit9ccc51775fb07bb606b614507f545ae1bbd7ac76 (patch)
tree6ab2920ef48833e960b5ab1034896c81b0120503 /src
parentcc5e0bedf42951df18169421f7ba185e9f24e827 (diff)
downloadmetacity-9ccc51775fb07bb606b614507f545ae1bbd7ac76.tar.gz
stack-tracker: fix an off-by-one error in restack_managed
When restacking the last window alone, we would trigger this off-by-one error. This would throw us off the end of the array, causing lower_below warnings for nonsensical values. Since the last window already is lowered below everything else, we shouldn't need to lower it.
Diffstat (limited to 'src')
-rw-r--r--src/core/stack-tracker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/stack-tracker.c b/src/core/stack-tracker.c
index d7dfe32c..6315b313 100644
--- a/src/core/stack-tracker.c
+++ b/src/core/stack-tracker.c
@@ -971,7 +971,7 @@ meta_stack_tracker_restack_managed (MetaStackTracker *tracker,
new_pos--;
}
- while (new_pos >= 0)
+ while (new_pos > 0)
{
meta_stack_tracker_lower_below (tracker, managed[new_pos], managed[new_pos - 1]);
new_pos--;