From 802671493d7c18569dac47ca91a4b7d6e693aff6 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 7 Nov 2022 18:05:54 +0800 Subject: [PATCH] Avoid invalid values showing up in scroll valuators * src/xterm.c (xi_populate_device_from_info): Reset emacs_value when invalid_p is cleared. --- src/xterm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index abe9c7304e8..1f14daa39f9 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5472,7 +5472,9 @@ xi_populate_device_from_info (struct x_display_info *dpyinfo, if (xi_device->valuators[c].number == tem->number) { xi_device->valuators[c].invalid_p = false; - xi_device->valuators[c].current_value = tem->current_value; + xi_device->valuators[c].current_value + = tem->current_value; + xi_device->valuators[c].emacs_value = 0.0; } } } -- 2.39.2