The taskmanager suffers from an issue where when the cpu- and memory usage plots reach the edge of the screen, the coloring gets clipped. See attached screenshot.
Reproducion:
1: open xfce4-taskmanager
2: wait for the time plot to fill the entire window (will take some minutes)
My guess is that this code was broken by a botched refactor in 0c7c789d by @ochosi (I think it's you, but you didn't add your commit email to your GitLab account), found in the 1.5.x releases but not 1.4.x shipped by Arch Linux.
It's necessary to call cairo_line_to (cr, width, height) before cairo_fill or cairo_fill_preserve, but this change didn't keep that call.
I'm not sure if it's even possible to use the same path for drawing the line, and filling underneath it. Right now in 1.4.2, there's a more subtle bug where the right side of graphs has an antialiased line extending down to (width, 0), caused by calling cairo_move_to (cr, width, height)before the for loop.
One idea to solve both is to start a line with cairo_move_to (cr, width + 1, height) (so the right-side line is off-screen), draw a line to (width + 1, monitor->history[0]), draw the line as usual but extend the loop for (step_size * (i - 1)) <= width + 1 (so the left-side line is off-screen), then draw a line to cairo_line_to (cr, width, height);. The disadvantage with this is that you're drawing more lines clipped off-screen, which could conceivably waste CPU time.
You could also reorder cairo_translate (cr, -step_size, 0); after cairo_line_to (cr, width, (1.0 - ((gdouble)(*peak))) * height);, so the graphs will start at the right of the screen rather than having a gap. Though this isn't technically necessary if you add a line point at (width + 1, monitor->history[0]).
Also, does Cairo have a feature to fill the entire graph below a line with a color, without manually specifying the region to be filled?