From b4a205b37c1b1ad4d4c400b43dd85faa7e929f38 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 3 Jan 2024 13:07:21 +0100 Subject: [PATCH] Pane: Fix flicker when opening/closing tabs Tab bar was losing focus for one frame which led to it skipping rendering of tab controls & flickering. It also occured when opening new tabs. --- crates/workspace2/src/pane.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/workspace2/src/pane.rs b/crates/workspace2/src/pane.rs index 9e620d993a345cb48bdd9dcfa056c61c0448e260..594c2a0b7878bc8260471b5e254fd953d3a3cd33 100644 --- a/crates/workspace2/src/pane.rs +++ b/crates/workspace2/src/pane.rs @@ -1687,7 +1687,7 @@ impl Pane { ), ) }) - .when(self.has_focus(cx), |tab_bar| { + .when(self.was_focused || self.has_focus(cx), |tab_bar| { tab_bar.end_child({ let render_tab_buttons = self.render_tab_bar_buttons.clone(); render_tab_buttons(self, cx)