summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-09-18 08:25:18 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-09-18 08:25:18 +0300
commitdaaf3e72b472e05a4378a7789c6ebedd9b0e9b6e (patch)
tree3c493d1261cc50d2f7e0bd068a411c2be032c5a7
parent7cd0223948d31662e2a31dd80f26f95a11daa98c (diff)
Paint: Set clip rectangle in split view
-rw-r--r--src/ui/paint.c5
1 files 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) {
98 98
99void unsetClip_Paint(iPaint *d) { 99void unsetClip_Paint(iPaint *d) {
100 if (numRoots_Window(get_Window()) > 1) { 100 if (numRoots_Window(get_Window()) > 1) {
101 const iRect rect = rect_Root(get_Root()); 101 setClip_Paint(d, rect_Root(get_Root()));
102 SDL_RenderSetClipRect(renderer_Paint_(d), (const SDL_Rect *) &rect);
103 return; 102 return;
104 } 103 }
105#if SDL_VERSION_ATLEAST(2, 0, 12) 104#if SDL_VERSION_ATLEAST(2, 0, 12)
@@ -145,7 +144,7 @@ void drawRectThickness_Paint(const iPaint *d, iRect rect, int thickness, int col
145void fillRect_Paint(const iPaint *d, iRect rect, int color) { 144void fillRect_Paint(const iPaint *d, iRect rect, int color) {
146 addv_I2(&rect.pos, origin_Paint); 145 addv_I2(&rect.pos, origin_Paint);
147 setColor_Paint_(d, color); 146 setColor_Paint_(d, color);
148// printf("fillRect_Paint: %d,%d %dx%d\n", rect.pos.x, rect.pos.y, rect.size.x, rect.size.y); 147// printf("fillRect_Paint: %d,%d %dx%d (%d)\n", rect.pos.x, rect.pos.y, rect.size.x, rect.size.y, color);
149 SDL_RenderFillRect(renderer_Paint_(d), (SDL_Rect *) &rect); 148 SDL_RenderFillRect(renderer_Paint_(d), (SDL_Rect *) &rect);
150} 149}
151 150