summaryrefslogtreecommitdiff
path: root/include/yasl/app.h
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-13 16:24:56 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-13 16:24:56 +0300
commited963bba0b234d52fda14b2a8237dbf02ef4d655 (patch)
tree0c7bd51ff01089fbc810f94a55e0adb94084478e /include/yasl/app.h
parent4a61a0f8a749831b74aca04302a30ebbbb6f5586 (diff)
Quit on window close when the app has no event callback
Without yasl_app_desc.event, a close request had nowhere to go and the window stayed open. The runner now stops instead, so hello drops its event callback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/yasl/app.h')
-rw-r--r--include/yasl/app.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/yasl/app.h b/include/yasl/app.h
index 79b2519..bf6de9c 100644
--- a/include/yasl/app.h
+++ b/include/yasl/app.h
@@ -166,7 +166,8 @@ struct yasl_app_desc {
* Unified event handler for input, window and user events, in arrival order.
* Event payloads and borrowed strings are valid for the duration of the callback.
* INPUT_RESET has no payload and requires clearing held application input.
- * Return YASL_APP_CONTINUE or YASL_APP_QUIT.
+ * Return YASL_APP_CONTINUE or YASL_APP_QUIT. Optional; without it, a
+ * WINDOW_CLOSE request on any window stops yasl_run().
*/
enum yasl_app_result (*event)(void *ud, const struct yasl_event *ev);