awesome/lib/wibox
Uli Schlachter d4cb8dc8b3 wibox.hierarchy:draw: Clear paths after .draw (#2805)
Cairo's save/restore methods handle all properties except for the
current path. The path is just left as-is.

A widget's draw method could create some path without consuming it. This
path would then interfere with random things later which did not expect
a path to already exist.

This commits adds calls to cairo_new_path() in the relevant positions to
clean things up.

This not only applies to a widget's draw method, but also
{before,after}_draw_{child,children}. However, these methods could (for
whatever reason) create paths that are to be consumed in one of the
other methods. To keep this working, the path is only cleared after all
of these methods ran.

I do not expect this commit to break anything, because a widget cannot
really assume much about what widget is drawn after it. Especially so,
because partial redraws could mean that some later widget is skipped and
not redrawn.

This should fix the issue reported at
https://github.com/awesomeWM/awesome/pull/2804.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-07-03 16:55:38 -04:00
..
container wibox.container.margin: Do not produce negative sizes 2019-06-19 18:18:06 +02:00
layout doc: Fix all the property, theme and field types. 2019-06-08 18:14:14 -04:00
widget Merge pull request #2800 from psychon/fix_negative_sizes 2019-06-21 17:30:59 -04:00
drawable.lua Add & use a dpi property on screen objects 2017-10-08 12:30:21 +02:00
hierarchy.lua wibox.hierarchy:draw: Clear paths after .draw (#2805) 2019-07-03 16:55:38 -04:00
init.lua doc: Add a constructor stereotype for everything. 2019-06-08 18:13:42 -04:00