summaryrefslogtreecommitdiff
path: root/src/ui/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 80504aae..39adba83 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -998,6 +998,8 @@ void draw_Window(iWindow *d) {
998#endif 998#endif
999 const int winFlags = SDL_GetWindowFlags(d->win); 999 const int winFlags = SDL_GetWindowFlags(d->win);
1000 const iBool gotFocus = (winFlags & SDL_WINDOW_INPUT_FOCUS) != 0; 1000 const iBool gotFocus = (winFlags & SDL_WINDOW_INPUT_FOCUS) != 0;
1001 iPaint p;
1002 init_Paint(&p);
1001 /* Clear the window. The clear color is visible as a border around the window 1003 /* Clear the window. The clear color is visible as a border around the window
1002 when the custom frame is being used. */ { 1004 when the custom frame is being used. */ {
1003#if defined (iPlatformAppleMobile) 1005#if defined (iPlatformAppleMobile)
@@ -1008,6 +1010,7 @@ void draw_Window(iWindow *d) {
1008 ? uiAnnotation_ColorId 1010 ? uiAnnotation_ColorId
1009 : uiSeparator_ColorId); 1011 : uiSeparator_ColorId);
1010#endif 1012#endif
1013 unsetClip_Paint(&p); /* update clip to full window */
1011 SDL_SetRenderDrawColor(d->render, back.r, back.g, back.b, 255); 1014 SDL_SetRenderDrawColor(d->render, back.r, back.g, back.b, 255);
1012 SDL_RenderClear(d->render); 1015 SDL_RenderClear(d->render);
1013 } 1016 }
@@ -1019,6 +1022,7 @@ void draw_Window(iWindow *d) {
1019 iRoot *root = d->roots[i]; 1022 iRoot *root = d->roots[i];
1020 if (root) { 1023 if (root) {
1021 setCurrent_Root(root); 1024 setCurrent_Root(root);
1025 unsetClip_Paint(&p); /* update clip to current root */
1022 draw_Widget(root->widget); 1026 draw_Widget(root->widget);
1023#if defined (LAGRANGE_ENABLE_CUSTOM_FRAME) 1027#if defined (LAGRANGE_ENABLE_CUSTOM_FRAME)
1024 /* App icon. */ 1028 /* App icon. */
@@ -1040,8 +1044,6 @@ void draw_Window(iWindow *d) {
1040#endif 1044#endif
1041 /* Root separator and keyboard focus indicator. */ 1045 /* Root separator and keyboard focus indicator. */
1042 if (numRoots_Window(d) > 1){ 1046 if (numRoots_Window(d) > 1){
1043 iPaint p;
1044 init_Paint(&p);
1045 const iRect bounds = bounds_Widget(root->widget); 1047 const iRect bounds = bounds_Widget(root->widget);
1046 if (i == 1) { 1048 if (i == 1) {
1047 fillRect_Paint(&p, (iRect){ 1049 fillRect_Paint(&p, (iRect){