From 254cedb6cced23bd36e41e14f2524278db7cc70a Mon Sep 17 00:00:00 2001 From: bru Date: Sun, 16 Oct 2022 18:23:44 +0000 Subject: [PATCH] Fix a bug in the initialization mechanism of wsmouse. The CONFIGURED flag, which indicates that first-time initialization has been completed, must be set immediately after the first call to wstpad_configure. Otherwise, passing touchpad parameters to the initialization function has no effect for some of them. --- sys/dev/wscons/wsmouse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/wscons/wsmouse.c b/sys/dev/wscons/wsmouse.c index c786af18208..17279f76949 100644 --- a/sys/dev/wscons/wsmouse.c +++ b/sys/dev/wscons/wsmouse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsmouse.c,v 1.69 2022/07/02 08:50:42 visa Exp $ */ +/* $OpenBSD: wsmouse.c,v 1.70 2022/10/16 18:23:44 bru Exp $ */ /* $NetBSD: wsmouse.c,v 1.35 2005/02/27 00:27:52 perry Exp $ */ /* @@ -1662,11 +1662,11 @@ wsmouse_configure(struct device *sc, "Initialization failed.\n"); return (-1); } + input->flags |= CONFIGURED; if (params != NULL) { if ((error = wsmouse_set_params(sc, params, nparams))) return (error); } - input->flags |= CONFIGURED; } if (IS_TOUCHPAD(input)) wsmouse_set_mode(sc, WSMOUSE_COMPAT); -- 2.20.1