netbsd: Support curses libraries without ncurses mouse support

This adds a configure check for the ncurses getmouse() function
and disables mouse-related code paths when mouse support is
not present in the curses library.

This is necessary for stable versions of NetBSD's libcurses, the
development version has stub mouse functions for compatibility
with ncurses.

Signed-off-by: Nia Alarie <nia@NetBSD.org>
This commit is contained in:
nia
2021-07-14 20:17:13 +02:00
committed by BenBE
parent d45b4f4a43
commit 2ab8fb83ba
4 changed files with 9 additions and 0 deletions

View File

@ -106,6 +106,7 @@ void InfoScreen_run(InfoScreen* this) {
}
}
#ifdef HAVE_GETMOUSE
if (ch == KEY_MOUSE) {
MEVENT mevent;
int ok = getmouse(&mevent);
@ -127,6 +128,7 @@ void InfoScreen_run(InfoScreen* this) {
#endif
}
}
#endif
if (this->inc->active) {
IncSet_handleKey(this->inc, ch, panel, IncSet_getListItemValue, this->lines);