From 5f26a48fbb772ccc9c9ffb1209ff00d3c11d88c7 Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Mon, 16 Jun 2025 23:40:00 +0200 Subject: Add a minimal zwlr_foreign_toplevel activate test tool; confirm aegis's focus-staleness report no longer reproduces tools/toplevel-activate: a standalone (not a workspace member - its own empty [workspace] table, so building srdwm itself never has to build this too) wayland-client + wayland-protocols-wlr binary that lists every open zwlr_foreign_toplevel_handle_v1, activates one by index, and prints the resulting `activated` state from the protocol's own feedback. wayland-client 0.31.14 / wayland-protocols-wlr 0.3.12 - the exact versions smithay 0.7.0 already pulls in, so this talks to the same real client library srdwm itself is built against, not a possibly-drifted one. Used it to reproduce aegis's own exact repro (nested `srdwm --wayland`, two plain alacritty windows, activate the non-focused one, check `srd clients`) precisely: launched a real nested instance, activated back and forth 5 times, checked `srd clients` immediately and after a delay each time. Every check matched the protocol's own `activated` feedback - no staleness found, on the nested/winit backend specifically (the peer's own repro environment). Documented in docs/TODO.md as likely already fixed by other focus/window-management work since the original report, not re-root-caused after the fact, but confirmed not currently reproducible via the exact repro that found it - left open one more round in case it resurfaces, with this tool as the fastest way back to a live repro if it does. --- tools/toplevel-activate/Cargo.toml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tools/toplevel-activate/Cargo.toml (limited to 'tools/toplevel-activate/Cargo.toml') diff --git a/tools/toplevel-activate/Cargo.toml b/tools/toplevel-activate/Cargo.toml new file mode 100644 index 0000000..bbfe6fc --- /dev/null +++ b/tools/toplevel-activate/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "toplevel-activate-test" +version = "0.1.0" +edition = "2021" + +# Standalone - deliberately not a member of the main workspace at +# ../../Cargo.toml, so building/testing srdwm itself never has to build +# this too. A debug tool, not part of the shipped product. +[workspace] + +[[bin]] +name = "activate" +path = "src/main.rs" + +[dependencies] +wayland-client = "=0.31.14" +wayland-protocols-wlr = { version = "=0.3.12", features = ["client"] } -- cgit v1.2.3