diff --git a/src/area_capture.rs b/src/area_capture.rs index fddddb7..b2ecb0d 100644 --- a/src/area_capture.rs +++ b/src/area_capture.rs @@ -13,11 +13,15 @@ pub struct AreaCapture { impl AreaCapture { pub fn new() -> AreaCapture { + let coordinate = xwininfo_to_coordinate( + String::from_utf8(Command::new("xwininfo").arg("-root").output().unwrap().stdout).unwrap() + ); + AreaCapture { - x: 0, - y: 0, - width: 0, - height: 0, + x: coordinate.0, + y: coordinate.1, + width: coordinate.2, + height: coordinate.3, } } diff --git a/src/ffmpeg_interface.rs b/src/ffmpeg_interface.rs index 71a73c0..c14bec7 100644 --- a/src/ffmpeg_interface.rs +++ b/src/ffmpeg_interface.rs @@ -105,7 +105,6 @@ impl Ffmpeg { // start recording and return the process id self.process_id = Some(ffmpeg_command.spawn().unwrap().id()); - println!("{}", self.process_id.unwrap()); self.process_id.unwrap() }