diff --git a/libwayshot/src/lib.rs b/libwayshot/src/lib.rs index 7ef81e19..35a7b0d1 100644 --- a/libwayshot/src/lib.rs +++ b/libwayshot/src/lib.rs @@ -419,7 +419,7 @@ impl WayshotConnection { &self, frames: &[(FrameCopy, FrameGuard, OutputInfo)], callback: Box Result>, - ) -> Result<(LogicalRegion)> { + ) -> Result { let mut state = LayerShellState { configured_outputs: HashSet::new(), }; @@ -497,10 +497,10 @@ impl WayshotConnection { Ok(()) })?; } - let region = callback()?; + let callback_result = callback(); layer_shell.destroy(); event_queue.blocking_dispatch(&mut state)?; - Ok(region) + callback_result } /// Take a screenshot from the specified region.