Skip to content

Commit

Permalink
Update so that cli activate-pane will show/hide the floating pane when
Browse files Browse the repository at this point in the history
the terminal window is not focused.
  • Loading branch information
e82eric committed Oct 6, 2024
1 parent d5a0072 commit 2e83b11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions mux/src/tab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1898,6 +1898,10 @@ impl TabInner {
}
}

if self.float_pane_visible {
self.set_float_pane_visibility(false);
}

if self.zoomed.is_some() {
if !configuration().unzoom_on_switch_pane {
return;
Expand Down Expand Up @@ -1925,6 +1929,9 @@ impl TabInner {
tab_id: self.id,
visible,
});
if let Some(window_id) = mux.window_containing_tab(self.id) {
mux.notify(MuxNotification::WindowInvalidated(window_id));
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion wezterm-mux-server-impl/src/sessionhandler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ impl SessionHandler {
spawn_into_main_thread(async move {
schedule_float_pane(float, send_response, client_id);
})
.detach();
.detach();
}

Pdu::FloatPaneVisibilityChanged(FloatPaneVisibilityChanged{ tab_id, visible }) => {
Expand All @@ -744,6 +744,7 @@ impl SessionHandler {
.get_tab(tab_id)
.ok_or_else(|| anyhow!("no such tab {}", tab_id))?;
tab.set_float_pane_visibility(visible);
mux.notify(mux::MuxNotification::FloatPaneVisibilityChanged{tab_id, visible});
Ok(Pdu::UnitResponse(UnitResponse {}))
},
send_response
Expand Down

0 comments on commit 2e83b11

Please sign in to comment.