diff options
| author | JJ Liebig <jonathan.liebig@gmail.com> | 2026-09-14 22:31:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-14 22:31:31 +0200 |
| commit | f867dabbe676255e75a512df343617bd4ca45d0d (patch) | |
| tree | a29f3235dc804ae1498d06664c7e1cc188b42fea /src/client/shell/composition.rs | |
| parent | b0c05e66635d12a85554f19f1a5e4796dcd68439 (diff) | |
fix: reject stale pane surfaces after reconnect (#4141)
Diffstat (limited to 'src/client/shell/composition.rs')
| -rw-r--r-- | src/client/shell/composition.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/shell/composition.rs b/src/client/shell/composition.rs index 0a577295..e0888d0d 100644 --- a/src/client/shell/composition.rs +++ b/src/client/shell/composition.rs @@ -147,9 +147,11 @@ impl ClientShellState { return Some(self.compose_unavailable(cols, rows)); } let snapshot = self.snapshot.as_deref()?; - // A one-step successor is retained separately until its exact snapshot arrives; do not - // keep composing the now-superseded current pair while it is pending. - if self.pending_pane_surface.is_some() { + // Do not compose a retained surface while waiting for its matching snapshot or + // connection generation. + if self.pending_pane_surface.is_some() + || self.pane_surface_generation != self.active_snapshot_generation + { return None; } let surface = self.pane_surface.as_ref()?; |
