diff --git a/docs/dev/core-model.md b/docs/dev/core-model.md index 6452fff9..eb7bed1e 100644 --- a/docs/dev/core-model.md +++ b/docs/dev/core-model.md @@ -1597,3 +1597,48 @@ because of a borrow, and Windows has no such need: they stay as they are). 4. The plan/execute split of `focus_workspace`, then `init`/`stop`/`new`/`restore_all_windows` as hooks. Gates for each: Windows `commands`, `workspaces`, `focus`, `stacking`, `monocle` (maximizing), `borders`, `layouts` scenarios; KDE fast tier and VM for the router change. + +## 25. Why `WindowManager
` still does not move, measured on `wip-cand8` (kfde, wip-u-wm2) + +The function comparison of sections 17, 18 and 20 repeated on the three `window_manager.rs` files at +`wip-cand8` (stripped function bodies, test module excluded; Windows 4464 lines, KDE 3766, macOS 4543): + +| | functions | lines | share of Windows | share of KDE | share of macOS | +|---|---|---|---|---|---| +| identical on all three | 43 | 696 | 15.6% | 18.5% | 15.3% | +| differ by at most 4 lines pairwise on all three | 81 | 1719 (KDE count) | about 39% | 46% | about 38% | +| identical on KDE and macOS (Windows may differ) | 102 | 2427 (KDE count) | - | 64% | 53% | + +The threshold of "more than 60% shared by all three" is not met, and the table shows it cannot be met by +moving what is already the same text: even adding the near-identical functions (which would each need a +converge revision first) gives 46% at best. Only KDE and macOS together pass 60% (64% of KDE's lines are +identical to macOS's), which is not the goal set for `WindowManager
` (all three). + +**The struct.** The common fields (`monitors`, `monitor_usr_idx_map`, `command_listener`, `is_paused`, +`resize_delta`, `hotwatch`, `work_area_offset`, the six behaviour settings, `mouse_follows_focus`, +`focus_follows_mouse` on Windows and KDE) are about 15 of 21 to 24 fields per daemon, so a +`WindowManager
` with `P::State` for the rest is possible in principle. What makes the move too
+invasive for one batch is what the fields' types and the identical functions depend on:
+- `incoming_events: Receiver `, `Monitor ` and `komorebi_core::command`, which already run on a stub.
+
+**What was done instead (D-coord-13 follow-up):** the one structural prerequisite that does not need the
+struct, `CommandHost::gate_message` (section 22.1), is in. A shared router needs the struct and waits for it.
+
+**Largest honest next subset, if the owner wants it:** a `WindowManager ` for KDE and macOS only
+(64% identical), with Windows following when kfw's hooks (section 24) exist; every daemon still needs the
+`P::Event` and `P::State` split above first. This is a decision for the owner, not a step to take
+unattended: it changes the shape of every `wm.` access in two daemons.