Register deadline timer for closing transaction

This commit is contained in:
Ivan Molodetskikh
2024-08-23 18:51:47 +03:00
parent a4f1caab1d
commit 28a8a9ace2
2 changed files with 14 additions and 2 deletions
+7 -1
View File
@@ -219,9 +219,15 @@ impl CompositorHandler for State {
id: u64::from(id.get()),
});
self.niri.layout.remove_window(&window, transaction);
self.niri.layout.remove_window(&window, transaction.clone());
self.add_default_dmabuf_pre_commit_hook(surface);
// If this is the only instance, then this transaction will complete
// immediately, so no need to set the timer.
if !transaction.is_last() {
transaction.register_deadline_timer(&self.niri.event_loop);
}
if was_active {
self.maybe_warp_cursor_to_focus();
}