# yasl gaps for wsap_term Date: 2026-10-13 yasl head checked: `83c2180` wsap_term state: `3a1439b`. The project builds, all 111 meson tests pass, and the include-graph check reports no violations. ## Summary All the earlier yasl gaps are closed in code. Drag targets, drag images, and file drops now exist on every backend. They were checked by reading code, not at runtime on X11 or macOS. The wsap_term audit of `83c2180` asks for new yasl API. Those requests are in "Open requests" below. One gap remains on the project side. ## Resolved in yasl ### 1. Drop-target events on X11 and Cocoa Status: **Resolved**. Both backends now send the target events. - X11: `drag_set_hover`, `drag_leave_hover`, and `drag_end` in `src/platform/x11/window.c` send `YASL_DRAG_OVER`, `YASL_DRAG_LEAVE`, and `YASL_DRAG_DROP`. The XDND target code sends `YASL_DROP_OVER` and `YASL_DROP_LEAVE`. - Cocoa: `src/platform/cocoa/window.m` sends all five target events. ### 2. Drag images on X11 and Cocoa Status: **Resolved**. X11 shows the image in an override-redirect window that follows the pointer (`drag_start` in `src/platform/x11/window.c`). Cocoa shows it in a borderless image window. No backend ignores the image now. ### 3. X11 file drops Status: **Resolved**. X11 accepts XDND drops of `text/uri-list` and sends `YASL_EVENT_DROP` (`src/platform/x11/window.c`). ### 4. IME preedit on X11 Status: **Resolved**. `XNSpotLocation` places the candidate window through `yasl_surface_set_ime_caret`. Preedit text and its cursor are available through `yasl_surface_ime_preedit` and `yasl_surface_ime_preedit_cursor`. ### 5. Cocoa popups Status: **Resolved** in commit `b20263c`. Child-window popups are implemented, and `YASL_CAP_POPUPS` is advertised. ### 6. X11 popups Status: **Resolved** in commit `b20263c`. Override-redirect popups are implemented, and `YASL_CAP_POPUPS` is advertised. ### 7. Cocoa primary selection Status: **Resolved** in commit `b20263c`. A dedicated pasteboard emulates the primary selection, and `YASL_CAP_PRIMARY_SELECTION` is advertised. ### 8. X11 and Cocoa CSD and frame-pacing flags Status: **Resolved**. - Cocoa advertises `YASL_CAP_CSD` and `YASL_CAP_FRAME_PACING`. - X11 advertises `YASL_CAP_CSD`, with `_NET_WM_MOVERESIZE` move and resize and `_GTK_SHOW_WINDOW_MENU`. - `yasl_run` paces continuous X11 surfaces at about 16 ms to avoid a spin loop. ## Project-side gaps (wsap_term) ### 9. Reset does not clear the UI pointer press yasl's `YASL_EVENT_INPUT_RESET` says the app must clear held keys, buttons, strokes, and composition state. The adapter (`src/ui/yasl/native_input.c`) now clears keyboard and held-button state. The UI still keeps the press active (`ui_route.c:116-119`, `selection.c:79`). A press can stay stuck after an X11 device removal, a queue allocation failure, or a Wayland text allocation failure. Suggested fix: send a pointer release to the UI on reset, or add a UI-level reset. ## Open requests from the wsap_term audit These are new yasl API requests. They are ordered by how much app code each one would remove. | # | Request | Status | | --- | --- | --- | | 1.1 | Signal watching on a loop | In progress | | 1.2 | Cross-thread wake or post for a plain `yasl_loop` | In progress | | 1.3 | Native double-click interval | In progress | | 1.4 | Held pointer buttons on motion | In progress | | 1.5 | Desktop helpers: open URL, notify, bell, appearance, executable path, resource directory, locale | In progress | | 1.6 | Drop URI decoding, framebuffer readback, `strndup` warning, `yasl_loop_kick` threading docs | In progress | Requests that live in the term subproject (the extra-button encoding) belong to that project, not to yasl. ## Not verified - Runtime behavior of items 1–3 on X11 and Cocoa. - Any Cocoa path. Cocoa needs a macOS build and test.