Fix ugly rounded corners

This commit is contained in:
Nikita Zlobin 2020-05-03 14:28:14 +05:00
parent fb2ffd425e
commit 4c4dc9aa95

View File

@ -110,10 +110,13 @@ static void x_win_round_corners(struct window_x11 *win, const int rad)
/* To mark all pixels, which should get exposed, we
* use a circle for every corner and two overlapping rectangles */
int fw = settings.frame_width / 2 + settings.frame_width % 2;
if (fw < 1)
fw=1;
unsigned const int centercoords[] = {
0, 0,
width - dia - 1, 0,
0, height - dia - 1,
-fw, -fw,
width - dia - 1, -fw,
-fw, height - dia - 1,
width - dia - 1, height - dia - 1,
};
@ -123,8 +126,8 @@ static void x_win_round_corners(struct window_x11 *win, const int rad)
shape_gc,
centercoords[i],
centercoords[i+1],
dia,
dia,
dia+fw,
dia+fw,
degrees * 0,
degrees * 360);
}