mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Fix wheel down event on legacy pancurses
This commit is contained in:
parent
eb9f1b1a81
commit
3c7386dd50
@ -327,6 +327,17 @@ impl Backend {
|
||||
// or a weird double-release event. :S
|
||||
self.last_mouse_button
|
||||
.map(MouseEvent::Hold)
|
||||
.or_else(|| {
|
||||
// In legacy mode, some buttons overlap,
|
||||
// so we need to disambiguate.
|
||||
if mevent.bstate
|
||||
== pancurses::BUTTON5_DOUBLE_CLICKED as mmask_t
|
||||
{
|
||||
Some(MouseEvent::WheelDown)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.map(&make_event)
|
||||
.unwrap_or_else(|| {
|
||||
debug!("We got a mouse drag, but no last mouse pressed?");
|
||||
|
Loading…
Reference in New Issue
Block a user