Skip to content

Commit

Permalink
fix(pinned-panes): allow pinning floating plugin panes with the mouse (
Browse files Browse the repository at this point in the history
  • Loading branch information
imsnif authored Feb 21, 2025
1 parent eb78beb commit 648d6ff
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions zellij-server/src/panes/plugin_pane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,20 @@ impl Pane for PluginPane {
}
false
}
fn intercept_mouse_event_on_frame(&mut self, event: &MouseEvent, client_id: ClientId) -> bool {
if self.position_is_on_frame(&event.position) {
let relative_position = self.relative_position(&event.position);
if let MouseEventType::Press = event.event_type {
if let Some(client_frame) = self.frame.get_mut(&client_id) {
if client_frame.clicked_on_pinned(relative_position) {
self.toggle_pinned();
return true;
}
}
}
}
false
}
fn reset_logical_position(&mut self) {
self.geom.logical_position = None;
}
Expand Down

0 comments on commit 648d6ff

Please sign in to comment.