mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-07 02:57:34 +00:00
Synthesize a mouse moved event also when the mouse is dragged
This commit is contained in:
parent
2cd21d1da8
commit
a9963f1b32
1 changed files with 5 additions and 2 deletions
|
@ -139,8 +139,11 @@ impl Presenter {
|
|||
|
||||
pub fn dispatch_event(&mut self, event: Event, cx: &mut MutableAppContext) {
|
||||
if let Some(root_view_id) = cx.root_view_id(self.window_id) {
|
||||
if matches!(event, Event::MouseMoved { .. }) {
|
||||
self.last_mouse_moved_event = Some(event.clone());
|
||||
match event {
|
||||
Event::MouseMoved { position, .. } | Event::LeftMouseDragged { position } => {
|
||||
self.last_mouse_moved_event = Some(Event::MouseMoved { position });
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
let mut event_cx = EventContext {
|
||||
|
|
Loading…
Reference in a new issue