summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2022-08-09 20:12:08 +0200
committerBenBE <BenBE@geshi.org>2022-08-10 07:46:15 +0200
commit1b5e0071bb210db67c6c846b9c91926fb6073852 (patch)
treedd87a1cc91008b01b551b0e2f2db2102ef528381
parenta7b7de829689b6981dc92a3b5f55feedb35076d2 (diff)
Restore non mouse support
Closes: #1061
-rw-r--r--CRT.c4
-rw-r--r--CRT.h4
-rw-r--r--CommandLine.c4
3 files changed, 10 insertions, 2 deletions
diff --git a/CRT.c b/CRT.c
index f010658b..8686b547 100644
--- a/CRT.c
+++ b/CRT.c
@@ -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();
diff --git a/CRT.h b/CRT.h
index 297e8964..c06d3ae7 100644
--- a/CRT.h
+++ b/CRT.h
@@ -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,

© 2014-2024 Faster IT GmbH | imprint | privacy policy