tree: refactor latch event dispatch
This commit is contained in:
parent
ada4e5a5f0
commit
01331afc6d
3 changed files with 9 additions and 4 deletions
|
|
@ -174,7 +174,7 @@ impl MetalConnector {
|
|||
self.latch_cursor(&node)?;
|
||||
let cursor_programming = self.compute_cursor_programming();
|
||||
let latched = self.latch(&node);
|
||||
node.schedule.latched();
|
||||
node.latched();
|
||||
|
||||
if cursor_programming.is_none() && latched.is_none() {
|
||||
return Ok(());
|
||||
|
|
|
|||
|
|
@ -912,6 +912,7 @@ impl State {
|
|||
output.global.persistent.scale.get(),
|
||||
render_hw_cursor,
|
||||
)?;
|
||||
output.latched();
|
||||
output.perform_screencopies(tex, !render_hw_cursor, 0, 0, None);
|
||||
rr.dispatch_frame_requests(self.now_msec());
|
||||
Ok(sync_file)
|
||||
|
|
|
|||
|
|
@ -106,6 +106,13 @@ pub async fn output_render_data(state: Rc<State>) {
|
|||
}
|
||||
|
||||
impl OutputNode {
|
||||
pub fn latched(&self) {
|
||||
self.schedule.latched();
|
||||
for listener in self.latch_event.iter() {
|
||||
listener.after_latch();
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update_exclusive_zones(self: &Rc<Self>) {
|
||||
let mut exclusive = ExclusiveSize::default();
|
||||
for layer in &self.layers {
|
||||
|
|
@ -153,9 +160,6 @@ 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