summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/mouse.c
diff options
context:
space:
mode:
authormurray <murray@FreeBSD.org>2000-04-08 03:04:32 +0000
committermurray <murray@FreeBSD.org>2000-04-08 03:04:32 +0000
commit025b04375037348440374732629c25661831a0b0 (patch)
treec0b777f301b3065cb19aff93e398822338aa0a56 /usr.sbin/sysinstall/mouse.c
parentbaa52b87aa970f0bbc7a478af19adaae79c4f242 (diff)
downloadFreeBSD-src-025b04375037348440374732629c25661831a0b0.zip
FreeBSD-src-025b04375037348440374732629c25661831a0b0.tar.gz
PR: 17559
Approved by: jkh You can't enable 'emulate 3 button' option for moused in sysinstall. This adds a menu option to set moused_flags and the help text explains that entering "-3" will enable this feature.
Diffstat (limited to 'usr.sbin/sysinstall/mouse.c')
-rw-r--r--usr.sbin/sysinstall/mouse.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/usr.sbin/sysinstall/mouse.c b/usr.sbin/sysinstall/mouse.c
index 2eec6be..0d23a28 100644
--- a/usr.sbin/sysinstall/mouse.c
+++ b/usr.sbin/sysinstall/mouse.c
@@ -37,10 +37,12 @@ mousedTest(dialogMenuItem *self)
{
char *type;
char *port;
+ char *flags;
int ret;
type = variable_get(VAR_MOUSED_TYPE);
port = variable_get(VAR_MOUSED_PORT);
+ flags = variable_get(VAR_MOUSED_FLAGS);
if ((type == NULL) || (port == NULL)
|| (strlen(type) <= 0) || (strlen(port) <= 0)
|| (strcmp(type, "NO") == 0)) {
@@ -52,7 +54,7 @@ mousedTest(dialogMenuItem *self)
if (file_readable("/var/run/moused.pid"))
vsystem("kill `cat /var/run/moused.pid`");
systemExecute("vidcontrol -m on");
- vsystem("moused -t %s -p %s", type, port);
+ vsystem("moused -t %s -p %s %s", type, port, flags);
ret = msgYesNo("Now move the mouse and see if it works.\n"
"(Note that buttons don't have any effect for now.)\n\n"
@@ -78,6 +80,21 @@ mousedDisable(dialogMenuItem *self)
variable_set2(VAR_MOUSED, "NO", 1);
variable_set2(VAR_MOUSED_TYPE, "NO", 1);
variable_unset(VAR_MOUSED_PORT);
+ variable_unset(VAR_MOUSED_FLAGS);
msgConfirm("The mouse daemon is disabled.");
return DITEM_SUCCESS;
}
+
+int
+setMouseFlags(dialogMenuItem *self)
+{
+ int ret;
+ ret = variable_get_value(VAR_MOUSED_FLAGS,
+ "Please Specify the mouse daemon flags. If you would like to\n"
+ "emulate 3 buttons, use -3 here.\n", 1)
+ ? DITEM_SUCCESS : DITEM_FAILURE;
+ if (ret != DITEM_SUCCESS)
+ variable_unset(VAR_MOUSED_FLAGS);
+ return ret;
+}
+
OpenPOWER on IntegriCloud