Files
wlgol/openspec/changes/archive/2026-11-11-fix-review-findings/tasks.md
T

23 lines
2.2 KiB
Markdown
Raw Normal View History

2026-11-11 17:45:37 +01:00
# Tasks
## 1. Input fixes
- [x] 1.1 Set `pd->x`/`pd->y` in `pointer_enter_handler` from `wl_fixed_to_double(sx/sy)` in `tpointer.c`; verify by running the app and confirming the pattern preview renders at the entry cell when the pointer enters without further motion
- [x] 1.2 Add `pointer_set_motion_handler()` to `tpointer.c`/`tpointer.h` mirroring the button-handler pattern, register it in `wlgol.c` to store logical cursor position, and stop reading `pointer_data.x/y` in `loop_update()`; verify with `cmake --build ./build` and `ctest --test-dir build` plus a run checking that painting still follows the cursor
2026-11-11 17:45:37 +01:00
## 2. Actions and default bindings
- [x] 2.1 Implement `ACTION_CLEAR` in `wlgol.c` as `grid_clear(&grid)` + `screen_dirty = 1`; verify by pressing the clear binding with cells on the grid and observing them disappear
- [x] 2.2 Add `"g" = "toggle_grid"` and `"c" = "clear"` to `default_file_content` in `config.c` and to the built-in defaults; verify with `ctest --test-dir build` (config tests) and a run pressing both keys on a fresh default config
- [x] 2.3 Extend `tests/test_config.c` to assert lookup of the new default bindings (`g` -> ACTION_TOGGLE_GRID, `c` -> ACTION_CLEAR) and verify with `ctest --test-dir build`
2026-11-11 17:45:37 +01:00
## 3. Buffer lifecycle on resize
- [x] 3.1 In `canvas_resize`, park the outgoing `wl_buffer`/`wl_shm_pool` in `canvas.old_buffer`/`old_pool` instead of destroying them immediately (munmap of old data stays immediate), and destroy them from `wl_buffer_release_handler`; verify by resizing the window repeatedly at fractional scale and confirming no artifacts or crashes (`WAYLAND_DEBUG=1` shows no destroy-before-release)
2026-11-11 17:45:37 +01:00
## 4. Cleanup (behavior-neutral)
- [x] 4.1 Remove `show_lines` from `grid_t` and its uses, keeping the `show_grid_lines` flag; verify with `ctest --test-dir build` and the grid-line toggle key
- [x] 4.2 Free `grid`, `grid_back`, `grid_rendered` after the main loop exits; verify with valgrind (or a leak-checker run of a short session) reporting no leaks from those buffers
- [x] 4.3 Remove the dead `ok ? 220 : 220` ternary and check `ftruncate`'s return value in `canvas_resize`; verify with `cmake --build ./build` producing no new warnings