From daaf3e72b472e05a4378a7789c6ebedd9b0e9b6e Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 18 Sep 2021 08:25:18 +0300 Subject: Paint: Set clip rectangle in split view --- src/ui/paint.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ui/paint.c b/src/ui/paint.c index 89de47d4..a3ee32c6 100644 --- a/src/ui/paint.c +++ b/src/ui/paint.c @@ -98,8 +98,7 @@ void setClip_Paint(iPaint *d, iRect rect) { void unsetClip_Paint(iPaint *d) { if (numRoots_Window(get_Window()) > 1) { - const iRect rect = rect_Root(get_Root()); - SDL_RenderSetClipRect(renderer_Paint_(d), (const SDL_Rect *) &rect); + setClip_Paint(d, rect_Root(get_Root())); return; } #if SDL_VERSION_ATLEAST(2, 0, 12) @@ -145,7 +144,7 @@ void drawRectThickness_Paint(const iPaint *d, iRect rect, int thickness, int col void fillRect_Paint(const iPaint *d, iRect rect, int color) { addv_I2(&rect.pos, origin_Paint); setColor_Paint_(d, color); -// printf("fillRect_Paint: %d,%d %dx%d\n", rect.pos.x, rect.pos.y, rect.size.x, rect.size.y); +// printf("fillRect_Paint: %d,%d %dx%d (%d)\n", rect.pos.x, rect.pos.y, rect.size.x, rect.size.y, color); SDL_RenderFillRect(renderer_Paint_(d), (SDL_Rect *) &rect); } -- cgit v1.2.3