From 2ab8fb83ba7d210c7c377b5b417f79822a6f7724 Mon Sep 17 00:00:00 2001 From: nia Date: Wed, 14 Jul 2021 20:17:13 +0200 Subject: 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 --- ScreenManager.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ScreenManager.c') diff --git a/ScreenManager.c b/ScreenManager.c index 8ec60119..c50d1c4a 100644 --- a/ScreenManager.c +++ b/ScreenManager.c @@ -172,6 +172,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { ch = getch(); HandlerResult result = IGNORED; +#ifdef HAVE_GETMOUSE if (ch == KEY_MOUSE && this->settings->enableMouse) { ch = ERR; MEVENT mevent; @@ -212,6 +213,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { } } } +#endif if (ch == ERR) { if (sortTimeout > 0) sortTimeout--; -- cgit v1.2.3