fix: let the picked window redraw as active before the shot
This commit is contained in:
1 parent
50ad31017f
commit
de79a84b03
1 file changed
+5
-1
+5
-1
@@ -287,7 +287,11 @@ fn capture(mode: Mode, common: Common) -> Result<()> {
|
|||||||
let chosen = if pick {
|
let chosen = if pick {
|
||||||
None
|
None
|
||||||
} else {
|
} 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)?
|
window_shot(&outputs, cursor, chosen)?
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user