Lagrange [release]

App: Event processing tweak

=> cf37fc31c6ef9a4ed01b6b9b642b858d2b7965eb

diff --git a/src/app.c b/src/app.c
index 9f35d727..3e6e9cdc 100644
--- a/src/app.c
+++ b/src/app.c
@@ -1291,9 +1291,10 @@ void processEvents_App(enum iAppEventMode eventMode) {
     iRoot *oldCurrentRoot = current_Root(); /* restored afterwards */
     SDL_Event ev;
     iBool gotEvents = iFalse;
+    iBool gotRefresh = iFalse;
     iPtrArray windows;
     init_PtrArray(&windows);
-    while (nextEvent_App_(d, eventMode, &ev)) {
+    while (nextEvent_App_(d, gotRefresh ? postedEventsOnly_AppEventMode : eventMode, &ev)) {
 #if defined (iPlatformAppleMobile)
         if (processEvent_iOS(&ev)) {
             continue;
@@ -1364,6 +1365,10 @@ void processEvents_App(enum iAppEventMode eventMode) {
                     dispatchCommands_Periodic(&d->periodic);
                     continue;
                 }
+                if (ev.type == SDL_USEREVENT && ev.user.code == refresh_UserEventCode) {
+                    gotRefresh = iTrue;
+                    continue;
+                }
 #if defined (LAGRANGE_ENABLE_IDLE_SLEEP)
                 if (ev.type == SDL_USEREVENT && ev.user.code == asleep_UserEventCode) {
                     if (SDL_GetTicks() - d->lastEventTime > idleThreshold_App_ &&
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/release/cdiff/cf37fc31c6ef9a4ed01b6b9b642b858d2b7965eb
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
58.410404 milliseconds
Gemini-to-HTML Time
0.196732 milliseconds

This content has been proxied by September (ba2dc).