screencopy: Only start capture in init_done if not capturing already
This commit is contained in:
parent
a939335b9e
commit
a4b1e73a8b
1 changed files with 2 additions and 3 deletions
|
|
@ -121,13 +121,12 @@ impl ScreencopyHandler for AppData {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create new buffer if none
|
// Create new buffer if none, then start capturing
|
||||||
// XXX What if formats have changed?
|
// XXX What if formats have changed?
|
||||||
if session.buffers.is_none() {
|
if session.buffers.is_none() {
|
||||||
session.buffers = Some(array::from_fn(|_| self.create_buffer(formats)));
|
session.buffers = Some(array::from_fn(|_| self.create_buffer(formats)));
|
||||||
|
session.attach_buffer_and_commit(&capture, conn, &self.qh);
|
||||||
}
|
}
|
||||||
|
|
||||||
session.attach_buffer_and_commit(&capture, conn, &self.qh);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn ready(
|
fn ready(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue