fix(pinned-panes): allow pinning floating plugin panes with the mouse (#4013)
This commit is contained in:
parent
eb78beb359
commit
648d6ff47a
1 changed files with 14 additions and 0 deletions
|
|
@ -745,6 +745,20 @@ impl Pane for PluginPane {
|
||||||
}
|
}
|
||||||
false
|
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) {
|
fn reset_logical_position(&mut self) {
|
||||||
self.geom.logical_position = None;
|
self.geom.logical_position = None;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue