diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-08-23 15:41:06 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-08-23 15:41:06 +0300 |
| commit | c8839f7658588bfd7f0f41bf2c2726e526366abf (patch) | |
| tree | 99a2efd437d61d2b1eeda7b96bc68aa940716ef6 /src/utils | |
| parent | dfe3580607ff469837c23b34db34882b16d87a47 (diff) | |
| download | niri-c8839f7658588bfd7f0f41bf2c2726e526366abf.tar.gz niri-c8839f7658588bfd7f0f41bf2c2726e526366abf.tar.bz2 niri-c8839f7658588bfd7f0f41bf2c2726e526366abf.zip | |
Implement window close transaction
Mainly visible with disabled animations.
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/transaction.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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()) { |
