diff options
author | Christopher Zimmermann <chrisz@cvs.openbsd.org> | 2024-10-05 13:27:17 +0000 |
---|---|---|
committer | Christopher Zimmermann <chrisz@cvs.openbsd.org> | 2024-10-05 13:27:17 +0000 |
commit | 408a688f7a4b36de3f6cad9c10b8fea91c79e5fc (patch) | |
tree | fe7acfec767a4c482d70ccf428d825857f6c0f4a /sbin | |
parent | 387c2ac1c63e2d048981922861f216e2e283f21d (diff) |
Make scaling available for normal mice, too; not just for touchpads.
Add reverse_scrolling to the manpage.
ok bru@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/wsconsctl/mouse.c | 8 | ||||
-rw-r--r-- | sbin/wsconsctl/mousecfg.c | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/sbin/wsconsctl/mouse.c b/sbin/wsconsctl/mouse.c index c880c92b57b..84cd656e935 100644 --- a/sbin/wsconsctl/mouse.c +++ b/sbin/wsconsctl/mouse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mouse.c,v 1.21 2023/07/02 21:44:04 bru Exp $ */ +/* $OpenBSD: mouse.c,v 1.22 2024/10/05 13:27:16 chrisz Exp $ */ /* $NetBSD: mouse.c,v 1.3 1999/11/15 13:47:30 ad Exp $ */ /*- @@ -58,13 +58,14 @@ struct field mouse_field_tab[] = { /* touchpad-specific options: */ { "tp.tapping", &cfg_tapping, FMT_CFG, FLG_NORDBACK }, { "tp.mtbuttons", &cfg_mtbuttons, FMT_CFG, FLG_NORDBACK }, - { "tp.scaling", &cfg_scaling, FMT_CFG, FLG_NORDBACK }, + { "tp.scaling", &cfg_scaling, FMT_CFG, FLG_NORDBACK | FLG_WRONLY }, { "tp.swapsides", &cfg_swapsides, FMT_CFG, FLG_NORDBACK }, { "tp.disable", &cfg_disable, FMT_CFG, FLG_NORDBACK }, { "tp.edges", &cfg_edges, FMT_CFG, FLG_NORDBACK }, { "tp.param", &cfg_param, FMT_CFG, FLG_WRONLY }, - /* Add an alias. This field is valid for all wsmouse devices. */ + /* Add aliases. These fields are valid for all wsmouse devices. */ { "param", &cfg_param, FMT_CFG, FLG_WRONLY }, + { "scaling", &cfg_scaling, FMT_CFG, FLG_NORDBACK }, { NULL } }; @@ -106,6 +107,7 @@ mouse_init(int devfd, int devidx) { for (f = mouse_field_tab; f->name != NULL; f++) if (f->format == FMT_CFG) { if (f->valp != &cfg_param + && f->valp != &cfg_scaling && f->valp != &cfg_revscroll) f->flags |= FLG_DEAD; else diff --git a/sbin/wsconsctl/mousecfg.c b/sbin/wsconsctl/mousecfg.c index 3b9d0da28fb..b813e13050a 100644 --- a/sbin/wsconsctl/mousecfg.c +++ b/sbin/wsconsctl/mousecfg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mousecfg.c,v 1.11 2024/09/25 19:56:33 bru Exp $ */ +/* $OpenBSD: mousecfg.c,v 1.12 2024/10/05 13:27:16 chrisz Exp $ */ /* * Copyright (c) 2017 Ulf Brosziewski @@ -356,6 +356,7 @@ mousecfg_pr_field(struct wsmouse_parameters *field) if (field == &cfg_scaling) { value = get_value(field, WSMOUSECFG_DX_SCALE); + value = value == 0 ? 4096 : value; f = (float) value / 4096; printf("%.3f", f); return; |