quickshell: fix worm never appearing (var array reassign emits no notify)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
4626e72219
commit
535fe56b76
1 changed files with 6 additions and 1 deletions
|
|
@ -872,7 +872,12 @@ in
|
|||
let t = worm.trail;
|
||||
t.unshift(Qt.point(nx, ny));
|
||||
if (t.length > weird.segments * weird.lag) t.pop();
|
||||
worm.trail = t; // reassign: arrays don't notify on mutation
|
||||
// slice(), not `t`: a var property assigned the array
|
||||
// it already holds emits no change signal, so the
|
||||
// segments would bind once to an empty trail and never
|
||||
// hear about a single tick. Copy = new reference =
|
||||
// notification. 30 short arrays a second is nothing.
|
||||
worm.trail = t.slice();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue