diff options
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1887,11 +1887,15 @@ render_csd_button_maximize_maximized( const int max_width = buf->width / 3; int width = min(max_height, max_width); - int thick = 1 * term->scale; + int thick = min(width / 2, 1 * term->scale); const int x_margin = (buf->width - width) / 2; const int y_margin = (buf->height - width) / 2; + xassert(x_margin + width - thick >= 0); + xassert(width - 2 * thick >= 0); + xassert(y_margin + width - thick >= 0); + pixman_image_fill_rectangles( PIXMAN_OP_SRC, buf->pix[0], &color, 4, (pixman_rectangle16_t[]){ |
