From 07f931d6cb1ae34c4fca50390d9d6eb71656e4ce Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 10:01:11 -0700 Subject: [PATCH] feat(windows): backend() accessor for the daemon A static WindowsBackend behind backend() -> &'static dyn Backend, the way KDE spells it. Nothing calls it yet; the next revisions switch call sites one cluster at a time (docs/dev/backend-switch.md). Not a behaviour change. Verified: Windows clippy -D warnings via tools/fast-check PASS. --- komorebi/src/windows_backend.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/komorebi/src/windows_backend.rs b/komorebi/src/windows_backend.rs index 43ab5b82..640fca5d 100644 --- a/komorebi/src/windows_backend.rs +++ b/komorebi/src/windows_backend.rs @@ -241,3 +241,12 @@ impl Backend for WindowsBackend { ))) } } + +static BACKEND: WindowsBackend = WindowsBackend; + +/// The backend the daemon calls, like `backend()` on KDE. Stateless, so one static serves every +/// thread. Call sites are being switched to it one cluster at a time: see +/// `docs/dev/backend-switch.md` for which are. +pub fn backend() -> &'static dyn Backend { + &BACKEND +}