From 8a7653cc7e4c7b677f2e58457e91f8c3885f3dc0 Mon Sep 17 00:00:00 2001 From: eatradish Date: Wed, 25 Mar 2026 11:34:42 +0800 Subject: [PATCH] fix(x11): fix panic with message: "Failed to get reply" ... ... due to some window has no pid --- src/gui/x11.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/x11.rs b/src/gui/x11.rs index dbf47ad..616aadf 100644 --- a/src/gui/x11.rs +++ b/src/gui/x11.rs @@ -36,7 +36,9 @@ impl X11 { let mut window_id = None; for window in windows { - let pids = Self::get_value32(&conn, window, net_wm_pid)?; + let Ok(pids) = Self::get_value32(&conn, window, net_wm_pid) else { + continue; + }; if pids.contains(&std::process::id()) { window_id = Some(window);