screencopy: Use send_success_when_ready for other forms of capture
A little annoying to add a `loop_handle` argument to `render_output`, but generally straightforward.
This commit is contained in:
parent
10c05bc1d4
commit
905d021552
4 changed files with 28 additions and 13 deletions
|
|
@ -471,8 +471,12 @@ pub fn render_workspace_to_buffer(
|
|||
}
|
||||
};
|
||||
|
||||
if let Some(PendingImageCopyData { frame, damage, .. }) = result {
|
||||
frame.success(transform, damage, common.clock.now())
|
||||
if let Some(pending_image_copy_data) = result {
|
||||
pending_image_copy_data.send_success_when_ready(
|
||||
transform,
|
||||
&common.event_loop_handle,
|
||||
common.clock.now(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -702,8 +706,12 @@ pub fn render_window_to_buffer(
|
|||
},
|
||||
};
|
||||
|
||||
if let Some(PendingImageCopyData { frame, damage, .. }) = result {
|
||||
frame.success(Transform::Normal, damage, common.clock.now())
|
||||
if let Some(pending_image_copy_data) = result {
|
||||
pending_image_copy_data.send_success_when_ready(
|
||||
Transform::Normal,
|
||||
&common.event_loop_handle,
|
||||
common.clock.now(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -858,7 +866,11 @@ pub fn render_cursor_to_buffer(
|
|||
}
|
||||
};
|
||||
|
||||
if let Some(PendingImageCopyData { frame, damage, .. }) = result {
|
||||
frame.success(Transform::Normal, damage, common.clock.now())
|
||||
if let Some(pending_image_copy_data) = result {
|
||||
pending_image_copy_data.send_success_when_ready(
|
||||
Transform::Normal,
|
||||
&common.event_loop_handle,
|
||||
common.clock.now(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue