From: Po Lu Date: Mon, 7 Nov 2022 10:05:54 +0000 (+0800) Subject: Avoid invalid values showing up in scroll valuators X-Git-Tag: emacs-29.0.90~1616^2~250 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=802671493d7c18569dac47ca91a4b7d6e693aff6;p=emacs.git Avoid invalid values showing up in scroll valuators * src/xterm.c (xi_populate_device_from_info): Reset emacs_value when invalid_p is cleared. --- 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; } } }