Skip to content

Commit

Permalink
chore: Pass wl_output reference for screenshot
Browse files Browse the repository at this point in the history
Signed-off-by: shootingstardragons <[email protected]>
Signed-off-by: Shinyzenith <[email protected]>
  • Loading branch information
Decodetalkers authored and Shinyzenith committed Aug 17, 2023
1 parent f404e9d commit 52f6683
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libwayshot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl WayshotConnection {
fn capture_output_frame(
&self,
cursor_overlay: i32,
output: WlOutput,
output: &WlOutput,
transform: Transform,
capture_region: Option<CaptureRegion>,
) -> Result<FrameCopy> {
Expand Down Expand Up @@ -176,7 +176,7 @@ impl WayshotConnection {
let frame: ZwlrScreencopyFrameV1 = if let Some(region) = capture_region {
screencopy_manager.capture_output_region(
cursor_overlay,
&output,
output,
region.x_coordinate,
region.y_coordinate,
region.width,
Expand All @@ -185,7 +185,7 @@ impl WayshotConnection {
(),
)
} else {
screencopy_manager.capture_output(cursor_overlay, &output, &qh, ())
screencopy_manager.capture_output(cursor_overlay, output, &qh, ())
};

// Empty internal event buffer until buffer_done is set to true which is when the Buffer done
Expand Down Expand Up @@ -332,7 +332,7 @@ impl WayshotConnection {
for intersecting_output in intersecting_outputs {
framecopys.push(self.capture_output_frame(
cursor_overlay,
intersecting_output.output.clone(),
&intersecting_output.output,
intersecting_output.transform,
Some(intersecting_output.region),
)?);
Expand Down

0 comments on commit 52f6683

Please sign in to comment.