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,13 +468,20 @@ impl super::TermWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
WMEK::Move => {
|
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, .. }) =
|
||||||
if Some(*button) == self.current_mouse_button.as_ref().map(mouse_press_to_tmb) {
|
self.last_mouse_click.as_ref()
|
||||||
Some(MouseEventTrigger::Drag {
|
{
|
||||||
streak: *streak,
|
if Some(*button)
|
||||||
button: *button,
|
== self.current_mouse_button.as_ref().map(mouse_press_to_tmb)
|
||||||
})
|
{
|
||||||
|
Some(MouseEventTrigger::Drag {
|
||||||
|
streak: *streak,
|
||||||
|
button: *button,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user