screencast: schedule toplevel screencasts with other screencasts
This commit is contained in:
parent
dbb9bd2299
commit
b28ea64509
8 changed files with 90 additions and 15 deletions
|
|
@ -37,8 +37,8 @@ use {
|
|||
},
|
||||
utils::{
|
||||
clonecell::CloneCell, copyhashmap::CopyHashMap, errorfmt::ErrorFmt,
|
||||
hash_map_ext::HashMapExt, linkedlist::LinkedList, scroller::Scroller,
|
||||
transform_ext::TransformExt,
|
||||
event_listener::EventSource, hash_map_ext::HashMapExt, linkedlist::LinkedList,
|
||||
scroller::Scroller, transform_ext::TransformExt,
|
||||
},
|
||||
wire::{JayOutputId, JayScreencastId, ZwlrScreencopyFrameV1Id},
|
||||
},
|
||||
|
|
@ -80,6 +80,11 @@ pub struct OutputNode {
|
|||
pub screencopies: CopyHashMap<(ClientId, ZwlrScreencopyFrameV1Id), Rc<ZwlrScreencopyFrameV1>>,
|
||||
pub title_visible: Cell<bool>,
|
||||
pub schedule: Rc<OutputSchedule>,
|
||||
pub latch_event: EventSource<dyn LatchListener>,
|
||||
}
|
||||
|
||||
pub trait LatchListener {
|
||||
fn after_latch(self: Rc<Self>);
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
||||
|
|
@ -148,6 +153,9 @@ impl OutputNode {
|
|||
y_off: i32,
|
||||
size: Option<(i32, i32)>,
|
||||
) {
|
||||
for listener in self.latch_event.iter() {
|
||||
listener.after_latch();
|
||||
}
|
||||
if let Some(workspace) = self.workspace.get() {
|
||||
if !workspace.may_capture.get() {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue