mirror of
https://github.com/wez/wezterm.git
synced 2024-11-10 15:04:32 +03:00
fix misclassification of mouse events
While looking at https://github.com/wez/wezterm/issues/945 I noticed that mouse moves were being considered to be drag events even though no mouse buttons were held down.
This commit is contained in:
parent
b4c4c85683
commit
fcd5512709
@ -468,13 +468,20 @@ impl super::TermWindow {
|
||||
}
|
||||
}
|
||||
WMEK::Move => {
|
||||
if let Some(LastMouseClick { streak, button, .. }) = self.last_mouse_click.as_ref()
|
||||
{
|
||||
if Some(*button) == self.current_mouse_button.as_ref().map(mouse_press_to_tmb) {
|
||||
Some(MouseEventTrigger::Drag {
|
||||
streak: *streak,
|
||||
button: *button,
|
||||
})
|
||||
if self.current_mouse_button.is_some() {
|
||||
if let Some(LastMouseClick { streak, button, .. }) =
|
||||
self.last_mouse_click.as_ref()
|
||||
{
|
||||
if Some(*button)
|
||||
== self.current_mouse_button.as_ref().map(mouse_press_to_tmb)
|
||||
{
|
||||
Some(MouseEventTrigger::Drag {
|
||||
streak: *streak,
|
||||
button: *button,
|
||||
})
|
||||
} else {
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user