remove support for ncurses terminal sequence escaping
This commit is contained in:
@@ -308,17 +308,6 @@ void MouseEvent::run()
|
||||
|
||||
m_old_mouse_event = m_mouse_event;
|
||||
m_mouse_event = wFooter->getMouseEvent();
|
||||
# if NCURSES_SEQUENCE_ESCAPING && NCURSES_MOUSE_VERSION == 1
|
||||
// workaround shitty ncurses behavior introduced in >=5.8, when we mysteriously get
|
||||
// a few times after ncmpcpp startup 2^27 code instead of BUTTON{1,3}_RELEASED. since that
|
||||
// 2^27 thing shows constantly instead of BUTTON2_PRESSED, it was redefined to be recognized
|
||||
// as BUTTON5_PRESSED. but clearly we don't want to trigger behavior bound to BUTTON5
|
||||
// after BUTTON{1,3} was pressed. so, here is the workaround: if last event was BUTTON{1,3}_PRESSED,
|
||||
// we MUST get BUTTON{1,3}_RELEASED afterwards. if we get BUTTON5_PRESSED, erroneus behavior
|
||||
// is about to occur and we need to prevent that.
|
||||
if (m_old_mouse_event.bstate & (BUTTON1_PRESSED | BUTTON3_PRESSED) && m_mouse_event.bstate & BUTTON5_PRESSED)
|
||||
return;
|
||||
# endif // NCURSES_SEQUENCE_ESCAPING && NCURSES_MOUSE_VERSION == 1
|
||||
|
||||
//Statusbar::printf("(%1%, %2%, %3%)", m_mouse_event.bstate, m_mouse_event.x, m_mouse_event.y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user