Skip to content

Commit

Permalink
fix: cannot capture single screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Dec 20, 2023
1 parent 2cd6524 commit a1cf31c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions libs/screenshotdialog/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ slint::include_modules!();

use std::sync::mpsc;

#[derive(Debug)]
pub enum SlintSelection {
GlobalScreen { showcursor: bool },
Slurp,
Expand Down
7 changes: 1 addition & 6 deletions src/screenshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ impl ScreenShotBackend {
.map_err(|_| zbus::Error::Failure("Cannot update outputInfos".to_string()))?;

let image_buffer = if options.interactive {
let wayinfos = WayshotConnection::new()
.map_err(|_| {
zbus::Error::Failure("Cannot create a new wayshot_connection".to_string())
})?
.get_all_outputs()
.clone();
let wayinfos = wayshot_connection.get_all_outputs().clone();
let screen_infos = wayinfos
.iter()
.map(|screen| ScreenInfo {
Expand Down

0 comments on commit a1cf31c

Please sign in to comment.