Destroy screencopy session when not capturing

This commit is contained in:
Ian Douglas Scott 2024-01-24 15:59:18 -08:00
parent b958a13b88
commit 6f1b391b00
3 changed files with 55 additions and 74 deletions

View file

@ -149,7 +149,7 @@ impl AppData {
let matches = self.matches_capture_filter(source);
let running = capture.running();
if matches {
capture.start(&self.conn);
capture.start(&self.screencopy_state.screencopy_manager, &self.qh);
} else {
capture.stop();
}
@ -165,7 +165,7 @@ impl AppData {
let capture =
Capture::new(source, &self.screencopy_state.screencopy_manager, &self.qh);
if matches {
capture.start(&self.conn);
capture.start(&self.screencopy_state.screencopy_manager, &self.qh);
}
capture
});