Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wibox.hierarchy:draw: Clear paths after .draw (awesomeWM#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 awesomeWM#2804. Signed-off-by: Uli Schlachter <[email protected]>
- Loading branch information