summaryrefslogtreecommitdiff
path: root/docs/guide.md
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 /docs/guide.md
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 'docs/guide.md')
-rw-r--r--docs/guide.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/guide.md b/docs/guide.md
index 62c2e1a..ab30c3d 100644
--- a/docs/guide.md
+++ b/docs/guide.md
@@ -41,12 +41,12 @@ it advertises CSD. Check each result and provide an application fallback.
All examples include `<yasl/app.h>` and call `yasl_run()` with a
`yasl_app_desc`. Set `window` to a `yasl_window_spec` for a single toplevel,
-which the runner creates before `init` with its first frame requested; `yasl_run()` returns an
-error if creation fails. Create further surfaces in the optional `init`, handle
-`YASL_EVENT_*` notifications in `event`, and render into `frame->cpu.pixels` in
-`frame`. Present with
-`yasl_frame_present_cpu(frame, NULL, 0)` and return `YASL_APP_QUIT` from an event
-handler to exit. The runner handles dispatch, input polling, resize redraws,
+which the runner creates before `init` with its first frame requested;
+`yasl_run()` returns an error if creation fails. Create further surfaces in the
+optional `init`, handle `YASL_EVENT_*` notifications in `event`, and render into
+`frame->cpu.pixels` in `frame`. Present with `yasl_frame_present_cpu(frame, NULL,
+0)` and return `YASL_APP_QUIT` from an event handler to exit. Without an `event`
+callback, closing any window stops the runner. The runner handles dispatch, input polling, resize redraws,
and remaining surface/display cleanup. Display quit stops the runner; connection
loss and dispatch failures return an error after cleanup. The runner delivers
input exactly as `yasl_surface_poll_event()` returns it, plus