From de79a84b03058ff771d0f02af82d7b25748a3b51 Mon Sep 17 00:00:00 2001 From: elwrcl Date: Sat, 3 Oct 2026 21:37:05 +0300 Subject: [PATCH] fix: let the picked window redraw as active before the shot --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 027ce25..af9e1b2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -287,7 +287,11 @@ fn capture(mode: Mode, common: Common) -> Result<()> { let chosen = if pick { None } else { - Some(picker::run(&mut wl, &outputs[focused_output(&outputs)])?) + let window = picker::run(&mut wl, &outputs[focused_output(&outputs)])?; + // While the picker had the keyboard, niri showed every window + // as inactive; give the chosen one a moment to redraw active. + std::thread::sleep(Duration::from_millis(150)); + Some(window) }; window_shot(&outputs, cursor, chosen)? }