diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-06 06:24:42 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-06 11:19:32 -0300 |
| commit | 0893d632e242553390d968751fff0e880627c34a (patch) | |
| tree | 154e40245fd97bf399efa2cc99872b5a48b1d0a0 /addons | |
| parent | 7ccbb0fa852e327b6663ba933f134d5013484007 (diff) | |
| download | pardes-0893d632e242553390d968751fff0e880627c34a.tar.gz pardes-0893d632e242553390d968751fff0e880627c34a.zip | |
kinds #12, ABI 2.1: pardes_addon.h grows at the ends of its records (pa_api's heap, view, exec and select, pa_paint's rail thumb, pa_ops's search, PA_WHEEL_LEFT and RIGHT) and the core reads them only from a 2.1 head: Esc goes to a 2.1 kind first, a press's drag and release stay its own and the pointer leaving is told, tick comes again on a view change, a kind's search rows, place, Exec and selection are taped, the jobs a call asks are emitted on every core from its taped outcome, a Shadow lays its tag out from the authority's prefix and keeps its tick state when it joins, a view's raster is its frontend's, and fake.c and snake.c leave Esc to the core
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/fake/fake.c | 2 | ||||
| -rw-r--r-- | addons/image/image.c | 4 | ||||
| -rw-r--r-- | addons/snake/snake.c | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/addons/fake/fake.c b/addons/fake/fake.c index 818c8ea3..81a78741 100644 --- a/addons/fake/fake.c +++ b/addons/fake/fake.c @@ -76,7 +76,7 @@ static void paint(void *st, const pa_window *w, pa_paint *out) { static int key(void *st, const pa_key *k) { fake *f = st; - if (k->cp == 'q') return 0; /* not taken: the core's */ + if (k->cp == 'q' || k->cp == 0x1b) return 0; /* not taken: the core's (Esc leaves) */ f->count++; f->last[0] = 'k'; f->last[1] = k->cp < 128 ? (char)k->cp : '?'; diff --git a/addons/image/image.c b/addons/image/image.c index f7a228c8..1aa34428 100644 --- a/addons/image/image.c +++ b/addons/image/image.c @@ -131,10 +131,12 @@ static uint32_t dump(void *st, uint8_t *buf, uint32_t n) { return im->len; } +/* On a state with no picture (a Restore's), the record's; one open made + * from the file as it is now (it changed on disk) keeps that one. */ static int load(void *st, const uint8_t *buf, uint32_t n, uint32_t version) { (void)version; if (!st) return 1; - keep(st, buf, n); + if (!((image *)st)->raw) keep(st, buf, n); return PA_OK; } diff --git a/addons/snake/snake.c b/addons/snake/snake.c index e6ad96e4..ce9279dc 100644 --- a/addons/snake/snake.c +++ b/addons/snake/snake.c @@ -109,6 +109,7 @@ static void paint(void *st, const pa_window *w, pa_paint *out) { static int key(void *st, const pa_key *k) { snake *s = st; + if (k->cp == 0x1b) return 0; /* Esc leaves */ if (s->dead) { restart(s); return 1; } int dx = 0, dy = 0; switch (k->cp) { |
