1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
# 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.
## 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.
## Drag and drop
### 1. X11 and Cocoa never send drop-target events (yasl)
yasl has these target events:
- `YASL_DRAG_OVER`, `YASL_DRAG_LEAVE`, `YASL_DRAG_DROP` (surface `drag` callback)
- `YASL_DROP_OVER`, `YASL_DROP_LEAVE` (surface `drop` callback)
Only the Wayland backend sends them:
- `src/wayland/clipboard.c`
- `src/wayland/drag.c`
X11 and Cocoa send only the source-side end (`YASL_DRAG_DROPPED` or
`YASL_DRAG_CANCELLED`).
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`).
Needed in yasl: send the target events from the X11 and Cocoa drag code.
### 2. Drag images are ignored on X11 and Cocoa (yasl)
- X11: `drag_start` in `src/x11/window.c` has `(void)image;`.
- Cocoa: `cocoa_display_drag_start` in `src/cocoa/window.m` has `(void)image;`.
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.
Needed in yasl: draw the image, or document that it is unsupported.
## Input and file drops
### 3. X11 does not send file drops (yasl)
`YASL_INPUT_DROP_FILES` is sent only by:
- `src/common/input.c` (helper)
- `src/cocoa/window.m`
- `src/wayland/pointer.c`
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)
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.
## Project-side gaps (wsap_term)
### 9. Reset does not clear pointer buttons
yasl's `YASL_INPUT_RESET` says the app must clear held keys and buttons,
and composition state.
`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.
Suggested fix: send a pointer-release-like event to the UI, or add a
UI-level reset.
## What is already fine
- 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.
## Suggested order
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.
|