Activate Zed window on external file drop
This commit is contained in:
parent
b692b4c9c2
commit
6c653b9c05
2 changed files with 7 additions and 0 deletions
|
@ -193,6 +193,12 @@ impl Deref for MouseExitEvent {
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct ExternalPaths(pub(crate) SmallVec<[PathBuf; 2]>);
|
pub struct ExternalPaths(pub(crate) SmallVec<[PathBuf; 2]>);
|
||||||
|
|
||||||
|
impl ExternalPaths {
|
||||||
|
pub fn paths(&self) -> &[PathBuf] {
|
||||||
|
&self.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Render for ExternalPaths {
|
impl Render for ExternalPaths {
|
||||||
type Element = Div;
|
type Element = Div;
|
||||||
|
|
||||||
|
|
|
@ -1284,6 +1284,7 @@ impl<'a> WindowContext<'a> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
FileDropEvent::Submit { position } => {
|
FileDropEvent::Submit { position } => {
|
||||||
|
self.activate(true);
|
||||||
self.window.mouse_position = position;
|
self.window.mouse_position = position;
|
||||||
InputEvent::MouseUp(MouseUpEvent {
|
InputEvent::MouseUp(MouseUpEvent {
|
||||||
button: MouseButton::Left,
|
button: MouseButton::Left,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue