st/theme-node-drawing: Don't skip square top left inset shadow corners

When the inner radius of the top left corner is 0, the corresponding arc
does not get drawn, resulting in a path going from the bottom left
corner to the top right corner when the path is closed.

Fix this by always including a line_to from the bottom left to the top
left corner.

Fixes: dde13b30c ("st/theme-node-drawing: Trace the correct path for inset box shadows")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7996
This commit is contained in:
Sebastian Keller 2024-10-21 21:53:14 +02:00
parent 86be4e31a6
commit 50434f0138

View File

@ -972,6 +972,11 @@ paint_inset_box_shadow_to_cairo_context (StThemeNode *node,
int inner_radius;
inner_radius = MAX (0, outer_radius[ST_CORNER_TOPLEFT] - shadow_spec->spread);
cairo_line_to (temp_cr,
shrunk_extents_x1,
shrunk_extents_y1 + inner_radius);
if (inner_radius > 0)
{
cairo_arc (temp_cr,