Download raw body.
wsconsctl mouse.tp.scaling is useful for normal mice as well
Hi,
mouse.tp.scaling is at least as useful for normal mice as it is for
touchpanels. Therefore add an alias available for all wsmouse devices.
Hide the original tp.scaling option by making in write-only.
OK?
Christopher
Index: mouse.c
===================================================================
RCS file: /cvs/src/sbin/wsconsctl/mouse.c,v
retrieving revision 1.21
diff -u -p -r1.21 mouse.c
--- mouse.c 2 Jul 2023 21:44:04 -0000 1.21
+++ mouse.c 15 Sep 2024 16:03:50 -0000
@@ -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
wsconsctl mouse.tp.scaling is useful for normal mice as well