diff options
author | Ametov Imil <charlz_klug@mail.ru> | 2023-10-06 00:03:58 +0300 |
---|---|---|
committer | Birte Friesel <derf@chaosdorf.de> | 2023-11-26 09:16:48 +0100 |
commit | 698dc599d6a3c4b00ad48429aceeb1a3078f6e91 (patch) | |
tree | f9c11480a749ffb241bc580119c35c784c19b19a /src/menu.c | |
parent | fa2b2c211025953f162c4d7935ed86db0db560d7 (diff) |
Fix for right-click buffer overflow
Diffstat (limited to 'src/menu.c')
-rw-r--r-- | src/menu.c | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -825,21 +825,17 @@ void feh_menu_draw_toggle_at(int x, int y, int w, int h, Imlib_Image dst, int ox void feh_menu_draw_submenu_at(int x, int y, Imlib_Image dst, int ox, int oy) { - ImlibPolygon poly; - - x -= ox; + // Draw filled triangle + x -= ox; y -= oy; imlib_context_set_image(dst); - - poly = imlib_polygon_new(); - imlib_polygon_add_point(poly, x, y + 3); - imlib_polygon_add_point(poly, x + 3, y + 6); - imlib_polygon_add_point(poly, x, y + 9); imlib_context_set_color(0, 0, 0, 255); - imlib_image_fill_polygon(poly); - imlib_polygon_free(poly); + for (int i= 0; i <= 3; i++) { + imlib_image_draw_line(x+i, y+3+i, x+i, y+9-i, 0); + } + return; } |