summaryrefslogtreecommitdiff
path: root/src/ui/window.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-09 12:54:28 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-10 06:29:31 +0300
commitc2b767db9385db0aedb1311f4212e7f4aa9441ec (patch)
tree2be7367af6568890b27719ff02adedf0b6365266 /src/ui/window.c
parent033050c5077ebcb02dd9f03ee2747284e1a0c5cf (diff)
Mobile: Freeze UI draws when app hidden
Maybe a workaround for the squished view issue?
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 032d68d1..aa854c72 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -1755,11 +1755,14 @@ static iBool handleWindowEvent_Window_(iWindow *d, const SDL_WindowEvent *ev) {
1755 d->isExposed = iTrue; /* no expose event is sent, so now we know it's visible */ 1755 d->isExposed = iTrue; /* no expose event is sent, so now we know it's visible */
1756 /* Returned to foreground, may have lost buffered content. */ 1756 /* Returned to foreground, may have lost buffered content. */
1757 invalidate_Window_(d); 1757 invalidate_Window_(d);
1758 postRefresh_App(); 1758 postCommand_App("window.unfreeze");
1759#endif 1759#endif
1760 return iFalse; 1760 return iFalse;
1761 case SDL_WINDOWEVENT_FOCUS_LOST: 1761 case SDL_WINDOWEVENT_FOCUS_LOST:
1762 postCommand_App("window.focus.lost"); 1762 postCommand_App("window.focus.lost");
1763#if defined (iPlatformMobile)
1764 setFreezeDraw_Window(d, iTrue);
1765#endif
1763 return iFalse; 1766 return iFalse;
1764 case SDL_WINDOWEVENT_TAKE_FOCUS: 1767 case SDL_WINDOWEVENT_TAKE_FOCUS:
1765 SDL_SetWindowInputFocus(d->win); 1768 SDL_SetWindowInputFocus(d->win);