summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-13 16:51:25 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-13 16:51:25 +0300
commit62717de20d2a0c8d3596a9223e56e734971e3ec5 (patch)
tree7011db10f2ef94e24fe3b5a121377002274b6e44
parent83c2180348ae4722157e12facfa9cd70c2c955d0 (diff)
Refresh the wsap_term gaps report for 83c2180
Drag targets, drag images, and X11 file drops are now implemented, so items 1-3 are resolved. Item 9 moves to the paths the audit reports. The new requests from the wsap_term audit are listed as open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--yasl-gaps-report.md153
1 files changed, 69 insertions, 84 deletions
diff --git a/yasl-gaps-report.md b/yasl-gaps-report.md
index fa09a04..a3f0b56 100644
--- a/yasl-gaps-report.md
+++ b/yasl-gaps-report.md
@@ -1,120 +1,105 @@
# yasl gaps for wsap_term
-Date: 2026-10-12
-yasl head checked: `97e5cc6` (same commit on `https://git.wsap.dev/yasl.git/`)
-wsap_term state: the project builds and all 89 non-fuzz tests pass.
+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
-The project already uses the new yasl API. Drag start, carry, and the
-source-side end work on X11 and Cocoa. Some drag and input features are
-still missing on some backends. Most of the gaps are in yasl. A few are in
-this project.
+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.
-## Drag and drop
+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.
-### 1. X11 and Cocoa never send drop-target events (yasl)
+## Resolved in yasl
-yasl has these target events:
+### 1. Drop-target events on X11 and Cocoa
-- `YASL_DRAG_OVER`, `YASL_DRAG_LEAVE`, `YASL_DRAG_DROP` (surface `drag` callback)
-- `YASL_DROP_OVER`, `YASL_DROP_LEAVE` (surface `drop` callback)
+Status: **Resolved**. Both backends now send the target events.
-Only the Wayland backend sends them:
+- 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.
-- `src/platform/wayland/clipboard.c`
-- `src/platform/wayland/drag.c`
+### 2. Drag images on X11 and Cocoa
-X11 and Cocoa send only the source-side end (`YASL_DRAG_DROPPED` or
-`YASL_DRAG_CANCELLED`).
+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.
-Effect in wsap_term: a tab dragged onto another window's tab bar gets no
-hover and no drop on X11 or macOS. The tab falls back to a new window
-(`flight_end` in `src/window/terminal/transfer.c`).
+### 3. X11 file drops
-Needed in yasl: send the target events from the X11 and Cocoa drag code.
+Status: **Resolved**. X11 accepts XDND drops of `text/uri-list` and sends
+`YASL_EVENT_DROP` (`src/platform/x11/window.c`).
-### 2. Drag images are ignored on X11 and Cocoa (yasl)
+### 4. IME preedit on X11
-- X11: `drag_start` in `src/platform/x11/window.c` has `(void)image;`.
-- Cocoa: `cocoa_display_drag_start` in `src/platform/cocoa/window.m` has `(void)image;`.
+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`.
-Effect: the drag image is not shown. The project does not use the image on
-these backends today, because they report `YASL_CAP_DRAG_CARRY`. The
-project uses the image only when carry is missing. That path runs on
-Wayland without toplevel-drag.
+### 5. Cocoa popups
-Needed in yasl: draw the image, or document that it is unsupported.
+Status: **Resolved** in commit `b20263c`. Child-window popups are implemented,
+and `YASL_CAP_POPUPS` is advertised.
-## Input and file drops
+### 6. X11 popups
-### 3. X11 does not send file drops (yasl)
+Status: **Resolved** in commit `b20263c`. Override-redirect popups are
+implemented, and `YASL_CAP_POPUPS` is advertised.
-`YASL_INPUT_DROP_FILES` is sent only by:
+### 7. Cocoa primary selection
-- `src/common/input.c` (helper)
-- `src/platform/cocoa/window.m`
-- `src/platform/wayland/pointer.c`
+Status: **Resolved** in commit `b20263c`. A dedicated pasteboard emulates the
+primary selection, and `YASL_CAP_PRIMARY_SELECTION` is advertised.
-Effect: dropping files onto a terminal window does nothing on X11.
-
-Needed in yasl: XDND file-drop handling for X11.
-
-### 4. IME preedit on X11 (yasl)
-
-Status: **Resolved**. Added `XNSpotLocation` candidate placement via `yasl_surface_set_ime_caret`, along with `yasl_surface_ime_preedit` and `yasl_surface_ime_preedit_cursor` backend operations.
-
-### 5. Cocoa popups (yasl)
-
-Status: **Resolved** in commit `b20263c`. Child window popups implemented, and `YASL_CAP_POPUPS` is advertised.
-
-### 6. X11 popups (yasl)
-
-Status: **Resolved** in commit `b20263c`. Override-redirect popups implemented, and `YASL_CAP_POPUPS` is advertised.
-
-### 7. Cocoa primary selection (yasl)
-
-Status: **Resolved** in commit `b20263c`. Dedicated pasteboard emulation implemented, and `YASL_CAP_PRIMARY_SELECTION` is advertised.
-
-### 8. X11 and Cocoa CSD and frame pacing flags (yasl)
+### 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 full `_NET_WM_MOVERESIZE` interactive move/resize and `_GTK_SHOW_WINDOW_MENU`.
-- The `yasl_run` application runner regulates X11 frame pacing at ~16ms for continuous surfaces to prevent spinloops.
+- 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 pointer buttons
+### 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.
-yasl's `YASL_INPUT_RESET` says the app must clear held keys and buttons,
-and composition state.
+Suggested fix: send a pointer release to the UI on reset, or add a UI-level
+reset.
-`window_native_input` in `src/window/native_input.c` clears only keyboard
-state. Pointer presses are tracked by the UI widgets, so a press that a
-reset interrupts can stay stuck until the next press or release.
+## Open requests from the wsap_term audit
-Suggested fix: send a pointer-release-like event to the UI, or add a
-UI-level reset.
+These are new yasl API requests. They are ordered by how much app code each
+one would remove.
-## What is already fine
+| # | 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 |
-- Cursor: now uses `YASL_CURSOR_HIDDEN` (`src/window/ui/ui_route.c`).
-- Accessibility on macOS: uses the typed view handle
- (`src/window/ui/accessibility/accessibility.m`). This file compiles only
- on macOS. It was not compiled here.
-- Pen input: pressure and tilt fields match yasl's contract.
-- Mouse buttons: 0 is primary, 1 is middle, 2 is secondary. This matches
- the project.
-- Drag and carry: wired to the caps. Used on X11 and Cocoa with no code
- change.
+Requests that live in the term subproject (the extra-button encoding) belong
+to that project, not to yasl.
-## Suggested order
+## Not verified
-1. Drop-target events on X11 and Cocoa (item 1). This unblocks tab merge.
-2. X11 file drops (item 3).
-3. Cocoa primary selection (item 7). Affects everyday terminal use on macOS.
-4. Popups on X11 and Cocoa (items 5 and 6), if menus need them.
-5. Project reset fix (item 9).
-6. Drag images (item 2), IME preedit (item 4), and frame-pacing caps (item 8)
- as lower priority.
+- Runtime behavior of items 1–3 on X11 and Cocoa.
+- Any Cocoa path. Cocoa needs a macOS build and test.