screencopy: Pass the node we're using to attach_buffer
Seems to make sure the compositor renders workspace with that GPU, so it actually captures successfully.
This commit is contained in:
parent
a5f2be7e88
commit
39401bf3c3
4 changed files with 42 additions and 11 deletions
|
|
@ -34,7 +34,10 @@ impl ScreencopyHandler for AppData {
|
|||
}
|
||||
let buffer = buffer.as_ref().unwrap();
|
||||
|
||||
session.attach_buffer(&buffer.buffer, None, 0); // XXX age?
|
||||
let node = buffer
|
||||
.node()
|
||||
.and_then(|x| x.to_str().map(|x| x.to_string()));
|
||||
session.attach_buffer(&buffer.buffer, node, 0); // XXX age?
|
||||
if capture.first_frame() {
|
||||
session.commit(zcosmic_screencopy_session_v1::Options::empty());
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue