aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2022-03-24 18:53:54 +0100
committerGitHub <noreply@github.com>2022-03-24 18:53:54 +0100
commitf5a3d8f301960808fad438534c77754fc75ad61a (patch)
tree92ad6db820f13e9515487f99d756b1a378df28e2
parentfix(tab): do not crash when only floating panes are left (#1266) (diff)
downloadsl0ppij-f5a3d8f301960808fad438534c77754fc75ad61a.tar.gz
sl0ppij-f5a3d8f301960808fad438534c77754fc75ad61a.tar.xz
sl0ppij-f5a3d8f301960808fad438534c77754fc75ad61a.zip
fix(tab): floating panes embed/fullscreen and frame color (#1267)
* fix(tab): floating panes embed/fullscreen and frame color * style(fmt): rustfmt
-rw-r--r--zellij-server/src/panes/tiled_panes/mod.rs4
-rw-r--r--zellij-server/src/tab/mod.rs6
2 files changed, 7 insertions, 3 deletions
diff --git a/zellij-server/src/panes/tiled_panes/mod.rs b/zellij-server/src/panes/tiled_panes/mod.rs
index 32f4a513..8112d896 100644
--- a/zellij-server/src/panes/tiled_panes/mod.rs
+++ b/zellij-server/src/panes/tiled_panes/mod.rs
@@ -314,12 +314,12 @@ impl TiledPanes {
pub fn has_panes(&self) -> bool {
!self.panes.is_empty()
}
- pub fn render(&mut self, output: &mut Output) {
+ pub fn render(&mut self, output: &mut Output, floating_panes_are_visible: bool) {
let connected_clients: Vec<ClientId> =
{ self.connected_clients.borrow().iter().copied().collect() };
let multiple_users_exist_in_session = { self.connected_clients_in_app.borrow().len() > 1 };
let mut client_id_to_boundaries: HashMap<ClientId, Boundaries> = HashMap::new();
- let active_panes = if self.session_is_mirrored {
+ let active_panes = if self.session_is_mirrored || floating_panes_are_visible {
HashMap::new()
} else {
self.active_panes
diff --git a/zellij-server/src/tab/mod.rs b/zellij-server/src/tab/mod.rs
index 22e4ef64..490a9b7b 100644
--- a/zellij-server/src/tab/mod.rs
+++ b/zellij-server/src/tab/mod.rs
@@ -554,6 +554,9 @@ impl Tab {
self.connected_clients.borrow().is_empty()
}
pub fn toggle_pane_embed_or_floating(&mut self, client_id: ClientId) {
+ if self.tiled_panes.fullscreen_is_active() {
+ self.tiled_panes.unset_fullscreen();
+ }
if self.floating_panes.panes_are_visible() {
if let Some(focused_floating_pane_id) = self.floating_panes.active_pane_id(client_id) {
if self.tiled_panes.has_room_for_new_pane() {
@@ -943,7 +946,8 @@ impl Tab {
);
self.hide_cursor_and_clear_display_as_needed(output);
- self.tiled_panes.render(output);
+ self.tiled_panes
+ .render(output, self.floating_panes.panes_are_visible());
if self.floating_panes.panes_are_visible() && self.floating_panes.has_active_panes() {
self.floating_panes.render(output);
}