mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Move periodic tasks to event loop closure
This commit is contained in:
+10
-3
@@ -105,9 +105,16 @@ fn main() {
|
||||
|
||||
event_loop
|
||||
.run(None, &mut data, move |data| {
|
||||
// niri is running.
|
||||
let _span = tracy_client::span!("flush_clients");
|
||||
data.display.flush_clients().unwrap();
|
||||
let _span = tracy_client::span!("loop callback");
|
||||
|
||||
// These should be called periodically, before flushing the clients.
|
||||
data.niri.space.refresh();
|
||||
data.niri.popups.cleanup();
|
||||
|
||||
{
|
||||
let _span = tracy_client::span!("flush_clients");
|
||||
data.display.flush_clients().unwrap();
|
||||
}
|
||||
})
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
@@ -225,9 +225,6 @@ impl Niri {
|
||||
|_, _| Some(output.clone()),
|
||||
)
|
||||
});
|
||||
|
||||
self.space.refresh();
|
||||
self.popups.cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user