diff options
| author | srdusr <[email protected]> | 2025-10-26 22:58:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2025-10-26 22:58:00 +0200 |
| commit | 304f3a374408bb6a5a04ebb7d4652c631395f5c6 (patch) | |
| tree | 8a40628fe016bd3e31c295cc76985d65c6354561 /docs | |
| parent | 9f07715b469a481849ee35ffa33d6dab34356c7d (diff) | |
| download | srdwm-304f3a374408bb6a5a04ebb7d4652c631395f5c6.tar.gz srdwm-304f3a374408bb6a5a04ebb7d4652c631395f5c6.zip | |
Live-expose monitor split, clean up leftover debug diagnostics
srd.monitor.split only ever ran at Lua config load despite being a plain
WindowManager mutation that every backend's monitors() already reads
fresh on each call. Adds srd dispatch set output split <name|id> <parts>
[rows|columns] (IPC set_monitor_split), same id-resolves-to-name pattern
set_output_enabled already uses.
Also removes eight log::warn!("XXX-DIAG ...") lines left behind from live
debugging in the multi-session shift that landed in 3c41fc4 - the same
"temporary, never removed" pattern already fixed twice earlier this
session. Several fired on genuinely constant interaction (every title
change, every workspace switch, every layer-shell surface hide), not
just a one-off leftover. Left xdg_shell.rs's own POPUP-GEOM-DIAG/
POPUP-GRAB-DIAG alone - that one is a still-open, self-documented
investigation, not litter.
Also documents (docs/TODO.md, not a code change) a live incident where
creating a second fake monitor visibly corrupted the real monitor's
position and kept drifting with no further input - not root-caused
srdwm-side, flagged to the AGS peer session since a fake monitor's real
wl_output global is indistinguishable from a real hotplug to GDK/GTK.
And documents a deliberate decision not to blind-port window decoration
rendering onto the experimental, never-live-tested GPU render path.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/TODO.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/TODO.md b/docs/TODO.md index 1392761..0db3a23 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -13,6 +13,32 @@ that has the full story. Keep this list current as items close or open; update the source doc's own entry too, don't let this drift into a second stale copy the way `PANEL_SUPPORT_TODO.md` did. +## Live incident: creating a fake/virtual monitor corrupted the real monitor's position, repeatedly, with no further input (2026-08-27) + +Asked to demo fake monitors live. `srd dispatch create fake-monitor FAKE-1 1920x1080` was harmless (`eDP-1` stayed at `full_x=0`), but creating a *second* one (`FAKE-2`) immediately moved `eDP-1` to `full_x=1920`, and it kept drifting on its own for at least one more tick afterward (`full_x=3840, y` climbing ~31px per tick) with zero further commands issued. Removing both fake monitors stopped the drift but did not self-restore `eDP-1`'s position; fixed by hand via `srd dispatch set output position eDP-1 0 0`, confirmed restored. The user's actual laptop panel visibly shifted during this. + +Not root-caused yet, and not blind-fixed: read `relayout_outputs` (`crates/wayland/src/udev/outputs.rs`) end to end - it only ever iterates `udev.heads` (real heads), never `udev.virtual_heads`, and `create_virtual_head` never touches any other head's position, only computes where to place the *new* one. Nothing found srdwm-side that should reposition a real head just because a fake one appeared, which points outward: a fake monitor is a genuine, independent `wl_output` global (deliberately excluded from `wlr-output-management-v1`'s own listing, per `virtual_heads.rs`'s module doc comment, but *not* excluded from the plain core-protocol registry any GDK/GTK client - AGS included - discovers monitors through). AGS's own `MonitorLayout.tsx` has multiple `restoreRememberedLayout()` call sites for "a monitor being replugged"/"re-enabled" (see this file's own 2026-08-26 entry on the two independent layout-restore systems) - exactly the shape of event a fake monitor's `wl_output` appearing looks like from outside srdwm, and if AGS's own layout matching is index/order-based rather than connector-name-based, a fake monitor inserting itself as "the second output" could explain both the jump and a feedback loop explaining the *continued* drift with no further input. + +Flagged directly to `dotfiles-1a` (the AGS peer session) with the full repro and three concrete questions (does AGS's layout restore fire around this; is its matching index- or name-based; would filtering fake monitors by `make == "srdwm" && model == "virtual"` be a reasonable AGS-side mitigation) rather than guessing further or re-triggering the corruption on the user's live screen a second time to narrow it down. **Fake monitors should not be created again on a live session with AGS running until this is resolved.** + +## GPU render path: decorations investigated, deliberately not blind-ported (2026-08-27) + +Asked directly to finish the GPU (`general.gpu`/`SRDWM_GPU=1`) render path - `gpu.rs`'s own module doc comment already says plainly what's missing: real window content renders, but "square corners, no border or titlebar" - decorations are the real gap. + +Read the Pixman path's own decoration loop (`udev/render.rs`, the `!locked` per-window block) end to end to scope the actual port. It is not a small addition: border top/bottom strips have their own corner-radius-vs-border-width curve-safety logic (`border_curve_is_safe`, tied to whether content masking succeeded that frame), a live-resize crop clamp against the decoration buffer's own last-built size (guards an out-of-bounds sample during an active drag), occlusion-fragment clipping against every window stacked in front (`visible_border_fragments`/`occluders`, needed for correctness, not polish - without it an overlapping window's titlebar bleeds through in front of whatever's on top of it), animation-aware geometry (`window_anims`' interpolated rect, not the model's resting `w.geometry`, or the border visibly detaches from the window mid-tween), and push-order dependencies between the top border, the titlebar, and the shadow that this file's own comments say were each found and fixed only by a live, reported, screenshotted bug (the wedge bug, the "not flush" border, the shadow-over-border smear). Several of the underlying geometry functions (`border_strips`, `visible_border_fragments`) are already renderer-agnostic and reusable as-is; the renderer-specific parts are a straightforward type substitution (`GlesRenderer` for `PixmanRenderer` in the `MemoryRenderBufferRenderElement::from_buffer` calls). + +Not attempted this pass, deliberately: `gpu.rs`'s own doc comment already states `SRDWM_GPU`/`general.gpu` are unset on every machine this was built and tested on, including this one - there is no working GPU-capable KMS+3D path here to visually confirm a single pixel of a port against, on a feature nobody currently has turned on (the live daily-driver session runs the Pixman path). Writing several hundred lines reproducing the above - much of it hard-won from real, previously-misjudged-live bugs - with no way to catch a transposed sign or an off-by-one crop before it ships is the same risk this project's own Chrome-titlebar-heuristic gap was left unfixed over: compiling clean and passing the existing test suite (which has no GPU-backend coverage at all) would prove nothing about whether it actually renders correctly. Left as a scoped, documented gap rather than a guess dressed up as a fix; a real attempt needs either a machine with a working GPU path to check against, or the user accepting an explicitly unverified merge. + +## Live-exposed `srd.monitor.split` and cleaned up eight leftover debug diagnostics (2026-08-27) + +`srd.monitor.split(name, parts, direction)` (divides one real output into N logical monitors for placement/tiling) only ever ran at Lua config load - `WindowManager::set_monitor_split` was already a plain, cheap mutation, and every backend's own `monitors()` already reads it fresh on every call (see the udev platform's own `monitors()`), so there was no real reason it couldn't be live. Added `srd dispatch set output split <name|id> <parts> [rows|columns]` (IPC `set_monitor_split`) following the exact same "resolve id to a name first" pattern `set_output_enabled` already established. `srd.monitor.scale` was investigated too but left alone - its own doc comment is explicit that a backend only applies it "the next time it brings connector `name`'s head up," and `request_output_enabled`'s queue is last-write-wins per name, so a same-tick disable-then-enable to force that collapses to a no-op re-enable; making that genuinely live needs new backend plumbing, not attempted blind here. + +Separately, found and removed eight `log::warn!("XXX-DIAG ...")` lines left behind from live debugging in the multi-session shift that landed in commit `3c41fc4` - the same "temporary, never removed" pattern already fixed twice earlier this session (see the 2026-08-21 POS-DIAG/CURSOR-DIAG entry and the 2026-08-27 TEMP-DIAG entry further down): `DECO-DIAG` (four call sites across `manager/windows.rs::add_window`/`reapply_rules_if_pending`, one in `state/lifecycle.rs::redraw_decoration_buffer`, one in `state/toplevel.rs::sync_toplevel_metadata`), `WS-IPC-DIAG` (`platform/ipc/dispatch.rs`'s `activate_workspace`), and `LAYER-VIS-DIAG` (`state/layers.rs`). Several of these fire on genuinely constant, ordinary interaction - `reapply_rules_if_pending`'s own doc comment says outright it runs "constantly for perfectly ordinary reasons (a browser tab finishing a page load)" - so this was real, continuous log noise on every title change, every workspace switch, every layer surface hide, not just a one-off leftover. + +Deliberately left alone: `protocols/xdg_shell.rs`'s `POPUP-GEOM-DIAG`/`POPUP-GRAB-DIAG` (five call sites). Unlike the eight removed above, this one is self-documented as a live, still-open investigation ("Temporary: live report is that Nemo's right-click context menu never appears at all... Remove once resolved") with no entry anywhere in this file confirming that investigation actually concluded - removing an active diagnostic for a bug nobody has confirmed fixed would be a real regression in debuggability, not a cleanup. Left for whoever is still chasing that one. + +Full workspace build/test/clippy clean (33 platform / 32 ctl tests, both up from before by the new split coverage). + ## Real bug, root-caused and fixed: the cursor itself leaves a "ghost" briefly when crossing between monitors (2026-08-27) Reported live, separately from the secondary-cursor ghost above (same word, different bug - this one is the user's own single, real cursor): "sometimes I recognize ghosting cursor when moving between monitors." |