diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-05-04 11:37:58 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-05-04 11:37:58 +0400 |
| commit | 7093385b4d51978a26f9d8c7e2230b4302e5f872 (patch) | |
| tree | ef6a8e15b74ada17792b509347bdfe0ee3ba5b47 /src/layout/tile.rs | |
| parent | 3748f6cd6a044ec56c461c20f07fac9197ad1119 (diff) | |
| download | niri-7093385b4d51978a26f9d8c7e2230b4302e5f872.tar.gz niri-7093385b4d51978a26f9d8c7e2230b4302e5f872.tar.bz2 niri-7093385b4d51978a26f9d8c7e2230b4302e5f872.zip | |
Update tile before taking unmap snapshot
Diffstat (limited to 'src/layout/tile.rs')
| -rw-r--r-- | src/layout/tile.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/layout/tile.rs b/src/layout/tile.rs index 68ee248e..f1816781 100644 --- a/src/layout/tile.rs +++ b/src/layout/tile.rs @@ -832,13 +832,16 @@ impl<W: LayoutElement> Tile<W> { } } - pub fn store_unmap_snapshot_if_empty(&self, renderer: &mut GlesRenderer, scale: Scale<f64>) { - let mut snapshot = self.unmap_snapshot.borrow_mut(); - if snapshot.is_some() { + pub fn store_unmap_snapshot_if_empty( + &mut self, + renderer: &mut GlesRenderer, + scale: Scale<f64>, + ) { + if self.unmap_snapshot.get_mut().is_some() { return; } - *snapshot = Some(self.render_snapshot(renderer, scale)); + *self.unmap_snapshot.get_mut() = Some(self.render_snapshot(renderer, scale)); } fn render_snapshot( |
