From c8839f7658588bfd7f0f41bf2c2726e526366abf Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Fri, 23 Aug 2024 15:41:06 +0300 Subject: Implement window close transaction Mainly visible with disabled animations. --- src/utils/transaction.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/utils') diff --git a/src/utils/transaction.rs b/src/utils/transaction.rs index 03dd6a2e..f4921947 100644 --- a/src/utils/transaction.rs +++ b/src/utils/transaction.rs @@ -148,6 +148,12 @@ impl Drop for Transaction { } } +impl TransactionBlocker { + pub fn completed() -> Self { + Self(Weak::new()) + } +} + impl Blocker for TransactionBlocker { fn state(&self) -> BlockerState { if self.0.upgrade().map_or(true, |x| x.is_completed()) { -- cgit