try delaying notify signal
This commit is contained in:
parent
4fd2608eab
commit
ba3cd74a68
1 changed files with 7 additions and 0 deletions
|
@ -162,6 +162,10 @@ mod imp {
|
|||
loop {
|
||||
let window = window.upgrade().unwrap();
|
||||
let listener = window.imp().mpv.wakeup_listener();
|
||||
|
||||
// only send property change notifications after the event queue is drained
|
||||
let freeze_notify = window.freeze_notify();
|
||||
|
||||
while let Some(event) = window.imp().mpv.wait_event(0.0) {
|
||||
use crate::mpv::Event;
|
||||
|
||||
|
@ -186,6 +190,9 @@ mod imp {
|
|||
_ => event!(Level::DEBUG, "unhandled {event:?}"),
|
||||
}
|
||||
}
|
||||
|
||||
// send property change notifications now
|
||||
drop(freeze_notify);
|
||||
drop(window);
|
||||
listener.await;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue