Skip to content

applets/taskmanager: fix TriangleMouseFiler in RtL

Christoph Wolk requested to merge cwo/plasma-desktop:filtermytriangles into master

Taskmanager sets TriangleMouseFilter's width to the childrenRect's width; this works well in general, but breaks on RtL. The childrenRect is relative to the parent (the TMF), and its coordinates get recalculated as the parent's coordinates change, which in the RtL case is when each item is added, causing the width to get updated -> binding loop. The width ends up getting stuck at most one task entry long, and for the others the TriangleFilter does not work as its width does not span them.

We already set the width of the taskList explicitly by calculating the children's width for other purposes, so we can just reuse that and avoid the loop.


Test plan:

  1. Have a horizontal panel with a task manager, set to have new items appear to the right (such as the default panel)
  2. plasmashell --restart --reverse
  3. without patch: "QML TriangleMouseFilter: Binding loop detected for property "width"; triangles don't get filtered when mousing over the tasks
  4. with patch: those binding loops are gone, triangles get filtered.

I think I figured out why it doesn't work and that this solves it; but I could be wrong - this is relatively complex.

BUG: 468955

Edited by Christoph Wolk

Merge request reports

Loading