diff options
author | nia <nia@NetBSD.org> | 2021-07-14 20:17:13 +0200 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-07-15 19:09:08 +0200 |
commit | 2ab8fb83ba7d210c7c377b5b417f79822a6f7724 (patch) | |
tree | f83599c5be12b94271f16482316e8cfcba8ef9aa /ScreenManager.c | |
parent | d45b4f4a4328ced5e291e6c309437599647c02e0 (diff) |
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>
Diffstat (limited to 'ScreenManager.c')
-rw-r--r-- | ScreenManager.c | 2 |
1 files changed, 2 insertions, 0 deletions
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--; |