Merge pull request #971 from tarkah/fix/pane-dragging-overlay

fix: allow titlebar overlays to close when dragging pane
This commit is contained in:
Héctor Ramón 2021-07-28 15:47:13 +07:00 committed by GitHub
commit a08e4ebccb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 26 deletions

View file

@ -149,6 +149,7 @@ where
renderer: &Renderer,
clipboard: &mut dyn Clipboard,
messages: &mut Vec<Message>,
is_picked: bool,
) -> event::Status {
let mut event_status = event::Status::Ignored;
@ -169,14 +170,18 @@ where
layout
};
let body_status = self.body.on_event(
event,
body_layout,
cursor_position,
renderer,
clipboard,
messages,
);
let body_status = if is_picked {
event::Status::Ignored
} else {
self.body.on_event(
event,
body_layout,
cursor_position,
renderer,
clipboard,
messages,
)
};
event_status.merge(body_status)
}