Phase 2: snapshot - window tree + screenshot via xcap

- Add xcap and image dependencies
- DesktopBackend trait with all 16 methods for future extensibility
- X11Backend with real snapshot() using xcap Window::all() and
  Monitor::all() for z-ordered window enumeration and screenshot
- Stub implementations for input/window management (phases 4-6)
- Wire X11Backend into DaemonState (now returns Result)
- Real snapshot handler replacing placeholder, updates ref map
This commit is contained in:
Harivansh Rathi 2026-03-24 21:24:34 -04:00
parent dfaa339594
commit 79e6e0e25c
8 changed files with 3041 additions and 34 deletions

View file

@ -46,7 +46,10 @@ async fn async_run() -> Result<()> {
.context(format!("Failed to bind socket: {}", socket_path.display()))?;
let session = std::env::var("DESKTOP_CTL_SESSION").unwrap_or_else(|_| "default".to_string());
let state = Arc::new(Mutex::new(DaemonState::new(session, socket_path.clone())));
let state = Arc::new(Mutex::new(
DaemonState::new(session, socket_path.clone())
.context("Failed to initialize daemon state")?
));
let shutdown = Arc::new(tokio::sync::Notify::new());
let shutdown_clone = shutdown.clone();