Fix some GUI dialogs that don't fit on screen darkening on redraws
Clip_rect_setter was implemented incorrectly: it ignored the previous clip rectangle and sometimes made the clip rectangle *larger* than it was before. That allowed partially obscured widgets to draw to a larger screen area than they were supposed to. Fixes #1583, #1591, #2202.
This commit is contained in:
parent
d2b53f5368
commit
01a81c2c6d
1 changed files with 3 additions and 1 deletions
|
@ -162,7 +162,9 @@ struct clip_rect_setter
|
|||
{
|
||||
if(operate_){
|
||||
SDL_GetClipRect(surface_, &rect_);
|
||||
SDL_SetClipRect(surface_, r);
|
||||
SDL_Rect final_rect;
|
||||
SDL_IntersectRect(&rect_, r, &final_rect);
|
||||
SDL_SetClipRect(surface_, &final_rect);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue