mirror of
https://github.com/wez/wezterm.git
synced 2024-11-23 15:04:36 +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,9 +468,13 @@ impl super::TermWindow {
|
||||
}
|
||||
}
|
||||
WMEK::Move => {
|
||||
if let Some(LastMouseClick { streak, button, .. }) = self.last_mouse_click.as_ref()
|
||||
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)
|
||||
{
|
||||
if Some(*button) == self.current_mouse_button.as_ref().map(mouse_press_to_tmb) {
|
||||
Some(MouseEventTrigger::Drag {
|
||||
streak: *streak,
|
||||
button: *button,
|
||||
@ -481,6 +485,9 @@ impl super::TermWindow {
|
||||
} else {
|
||||
None
|
||||
}
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
WMEK::VertWheel(_) | WMEK::HorzWheel(_) => None,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user