get default window area, remove debug process id

This commit is contained in:
Salem Yaslem 2021-02-13 07:45:08 +03:00
parent 6d7a0f2a5b
commit 1ca87ced12
2 changed files with 8 additions and 5 deletions

View File

@ -13,11 +13,15 @@ pub struct AreaCapture {
impl AreaCapture { impl AreaCapture {
pub fn new() -> AreaCapture { pub fn new() -> AreaCapture {
let coordinate = xwininfo_to_coordinate(
String::from_utf8(Command::new("xwininfo").arg("-root").output().unwrap().stdout).unwrap()
);
AreaCapture { AreaCapture {
x: 0, x: coordinate.0,
y: 0, y: coordinate.1,
width: 0, width: coordinate.2,
height: 0, height: coordinate.3,
} }
} }

View File

@ -105,7 +105,6 @@ impl Ffmpeg {
// start recording and return the process id // start recording and return the process id
self.process_id = Some(ffmpeg_command.spawn().unwrap().id()); self.process_id = Some(ffmpeg_command.spawn().unwrap().id());
println!("{}", self.process_id.unwrap());
self.process_id.unwrap() self.process_id.unwrap()
} }