docs: update ROADMAP + BACKEND_ABSTRACTION to reflect WINGs X11 isolation complete
This commit is contained in:
parent
8a4e3954a0
commit
0f3ce45d38
|
|
@ -1,11 +1,16 @@
|
|||
# Backend-Specific Branches Remaining in `src/` Policy Code
|
||||
|
||||
> **Status (2026-05-26):** This document was written during the initial abstraction
|
||||
> analysis. Since then, `wmspec.c` and `xdnd.c` have been **moved to
|
||||
> `src/backend/x11/`** and all `_x11_raw` references have been eliminated from
|
||||
> policy code (`src/*.c` now has zero `_x11_raw` accesses and zero direct Xlib
|
||||
> calls). The information below remains useful as a historical reference for the
|
||||
> abstraction work that was performed.
|
||||
> **Status (2026-05-28, final):** This document was written during the initial
|
||||
> abstraction analysis and has been superseded by ROADMAP.md. All X11 isolation
|
||||
> work described below has been completed:
|
||||
>
|
||||
> - `wmspec.c` and `xdnd.c` moved to `src/backend/x11/` — done
|
||||
> - `_x11_raw` references eliminated from `src/` policy code — done
|
||||
> - **WINGs widget library**: All 412+ direct Xlib calls isolated to `_x11.c`
|
||||
> backend files with Wayland stubs in `wstubs_no_x11.c` — done
|
||||
>
|
||||
> The counts below are **historical** and reflect the state before the refactoring.
|
||||
> See ROADMAP.md for the current state.
|
||||
|
||||
The backend vtable (`wm_backend->*()`) handles most display-system dispatch, but significant X11-specific code still lives directly in the policy files. Here's every category.
|
||||
|
||||
|
|
|
|||
65
ROADMAP.md
65
ROADMAP.md
|
|
@ -1,21 +1,27 @@
|
|||
# WindowMaker Wayland Port — Roadmap
|
||||
|
||||
## Current State (2026-05-28, updated)
|
||||
## Current State (2026-05-28, final)
|
||||
|
||||
The backend abstraction is complete. The `src/` policy layer has zero direct Xlib
|
||||
calls and zero `_x11_raw` references. The Wayland backend (wlroots-based, 10K lines)
|
||||
implements all core window management: stacking, maximize, shade, workspaces,
|
||||
alt-tab, dock/clip, menus, move/resize, focus, and frame rendering.
|
||||
|
||||
WPrefs.app launches on Wayland but crashes are still observed — the root cause
|
||||
is **WINGs widget library**, which still has 412 direct Xlib calls in 15 non-split
|
||||
widget files that bypass the vtable dispatch (see Priority 2).
|
||||
**WINGs X11 call isolation is complete.** All 412+ direct Xlib calls that previously
|
||||
lived in shared widget code have been isolated to per-backend `_x11.c` files with
|
||||
Wayland stubs in `wstubs_no_x11.c`. The remaining work is feature implementation,
|
||||
not leak cleanup.
|
||||
|
||||
**DND progress**: compositor-internal drag-and-drop (WINGs view ↔ WINGs view) is now
|
||||
fully functional. Drag images render as scene-graph overlays, cursor changes to "plus"
|
||||
over valid drop targets. Cross-client DND (external Wayland client ↔ WINGs) has basic
|
||||
wiring in place — accepts drags, tracks motion/drop — but needs MIME type routing to
|
||||
WINGs destination procs to be fully functional.
|
||||
**What works on Wayland:**
|
||||
- Window management (stacking, maximize, shade, workspaces, alt-tab, move/resize)
|
||||
- DND (compositor-internal with drag image overlay + cursor feedback; cross-client
|
||||
via wl_data_device with basic MIME routing)
|
||||
- Clipboard + primary selection (copy/paste between Wayland native and XWayland)
|
||||
- Session persistence (save/restore for native Wayland clients)
|
||||
- Balloon tooltips (proper leave tracking + multi-line text)
|
||||
- Window thumbnails (client_snapshot via buffer read)
|
||||
- XWayland client support (DISPLAY=:1 via eager mode startup)
|
||||
- WPrefs.app (all preference panels — crashes fixed by X11 call isolation)
|
||||
|
||||
The smoke test suite passes for core WM features.
|
||||
|
||||
|
|
@ -66,7 +72,7 @@ XWayland bridge auto-syncs. Needs verification.
|
|||
| Slot | Status |
|
||||
|------|--------|
|
||||
| `overlay_draw_*` | ✅ Done — real pixman overlay implementation |
|
||||
| `client_snapshot` | ❌ Stub — needs last-committed texture → RImage |
|
||||
| `client_snapshot` | ✅ Done — buffer read for native, XGetImage for XWayland |
|
||||
| `window_set_border` | ✅ No-op (borders drawn into frame buffer) |
|
||||
| `client_synth_configure` | ✅ Done — XDG configure + XWayland configure |
|
||||
| `pointer_change_grab` | ⚠️ No-op — menu tracking may need this |
|
||||
|
|
@ -117,31 +123,24 @@ WINGs APIs on the Wayland path.
|
|||
These files need backend abstraction — either routing through the existing
|
||||
5 vtables, or adding new vtables for DND, selection, and input methods.
|
||||
|
||||
### WINGs Porting Strategy
|
||||
### WINGs X11 Call Isolation — COMPLETE
|
||||
|
||||
- [x] **DND subsystem** (`dragsource.c` + `dragdestination.c` + `dragcommon.c`, 2437 LOC,
|
||||
98 calls) — **done**. Compositor-internal DND fully functional (drag image, cursor feedback,
|
||||
hit-testing via W_FindViewAtPoint, modal drag loop in wl_drag_begin). Cross-client DND
|
||||
(wl_data_device) has basic wiring — needs MIME type → WINGs type routing to complete.
|
||||
All 412+ direct Xlib calls in WINGs have been isolated to `_x11.c` backend files.
|
||||
No active X11 calls remain in non-backend WINGs source files.
|
||||
|
||||
- [x] **`wcolorpanel.c`** (3556 LOC, 89 calls) — **done**. Split into three files:
|
||||
`wcolorpanel.c` (backend-neutral, 2997 lines), `wcolorpanel_x11.c` (X11 magnifying glass,
|
||||
601 lines), `wcolorpanel_wl.c` (Wayland stub). Magnify button shows "not available"
|
||||
dialog on Wayland. All 89 X11 calls isolated to `wcolorpanel_x11.c`.
|
||||
|
||||
3. **`wwindow.c` + `widgets.c`** (1849 LOC, 76 calls) — window property management
|
||||
needs backend dispatch (ICCCM is X11-only; Wayland properties differ).
|
||||
|
||||
4. **`winputmethod.c`** (243 LOC, 40 calls) — replace XIM/XIC with
|
||||
`zwp_text_input_v3` or use xkbcommon directly.
|
||||
|
||||
5. **`selection.c`** (392 LOC, 21 calls) — replace X selection protocol with
|
||||
`wl_data_device` / `zwp_primary_selection_v1`.
|
||||
|
||||
6. **`wballoon.c`** (476 LOC, 28 calls) — route drawing through `W_RenderBackend`.
|
||||
|
||||
7. **`wtext.c` + `wtextfield.c`** (5577 LOC, 33 calls) — route clipboard and
|
||||
grabs through backends.
|
||||
| File | LOC | X11 Calls | Status |
|
||||
|------|-----|-----------|--------|
|
||||
| DND (drag*source/destination/common) | 2437 | 98 | Isolated — internal DND works, cross-client
|
||||
via wl_data_device with basic MIME routing |
|
||||
| `wcolorpanel.c` | 3556 | 89 | Split into `wcolorpanel.c` + `_x11.c` + `_wl.c` |
|
||||
| `wwindow.c` + `widgets.c` | 1849 | 76 | Already clean — all via vtable dispatch |
|
||||
| `winputmethod_x11.c` | 243 | 40 | Isolated — Wayland stub in wstubs_no_x11.c |
|
||||
| `selection_x11.c` | 392 | 21 | Push + fetch via clipboard hooks; synchronous
|
||||
fetch path on Wayland |
|
||||
| `wballoon_x11.c` | 476 | 28 | Wayland balloon_draw in wview_wl.c renders
|
||||
yellow tooltip with multi-line support |
|
||||
| `wtext.c` + `wtextfield.c` | 5577 | 33 | Already clean — all via vtable dispatch |
|
||||
| All other `_x11.c` files | ~2000 | ~27 | Isolated — stubs in wstubs_no_x11.c |
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue