diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2022-08-09 20:12:08 +0200 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2022-08-10 07:46:15 +0200 |
commit | 1b5e0071bb210db67c6c846b9c91926fb6073852 (patch) | |
tree | dd87a1cc91008b01b551b0e2f2db2102ef528381 | |
parent | a7b7de829689b6981dc92a3b5f55feedb35076d2 (diff) |
Restore non mouse support
Closes: #1061
-rw-r--r-- | CRT.c | 4 | ||||
-rw-r--r-- | CRT.h | 4 | ||||
-rw-r--r-- | CommandLine.c | 4 |
3 files changed, 10 insertions, 2 deletions
@@ -900,8 +900,8 @@ void CRT_resetSignalHandlers(void) { signal(SIGQUIT, SIG_DFL); } -void CRT_setMouse(bool enabled) { #ifdef HAVE_GETMOUSE +void CRT_setMouse(bool enabled) { if (enabled) { #if NCURSES_MOUSE_VERSION > 1 mousemask(BUTTON1_RELEASED | BUTTON4_PRESSED | BUTTON5_PRESSED, NULL); @@ -911,8 +911,8 @@ void CRT_setMouse(bool enabled) { } else { mousemask(0, NULL); } -#endif } +#endif void CRT_init(const Settings* settings, bool allowUnicode) { redirectStderr(); @@ -185,7 +185,11 @@ extern int CRT_scrollWheelVAmount; extern ColorScheme CRT_colorScheme; +#ifdef HAVE_GETMOUSE void CRT_setMouse(bool enabled); +#else +#define CRT_setMouse(enabled) +#endif void CRT_init(const Settings* settings, bool allowUnicode); diff --git a/CommandLine.c b/CommandLine.c index 9749158b..ee9047d2 100644 --- a/CommandLine.c +++ b/CommandLine.c @@ -79,7 +79,9 @@ typedef struct CommandLineSettings_ { int sortKey; int delay; bool useColors; +#ifdef HAVE_GETMOUSE bool enableMouse; +#endif bool treeView; bool allowUnicode; bool highlightChanges; @@ -96,7 +98,9 @@ static CommandLineStatus parseArguments(const char* program, int argc, char** ar .sortKey = 0, .delay = -1, .useColors = true, +#ifdef HAVE_GETMOUSE .enableMouse = true, +#endif .treeView = false, .allowUnicode = true, .highlightChanges = false, |