From bab29694047d060bb58ff88e1a4d2cc7ef05df2a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 1 Dec 2021 15:36:55 +0200 Subject: Support precision mouse scrolling on MS-Windows * src/w32fns.c (w32_wnd_proc): Pass the WM_SETTINGCHANGE message to the Lisp thread. * src/w32term.c (w32_construct_mouse_wheel): Support mice with precision scrolling wheel. (w32_get_mouse_wheel_vertical_delta): New function. (w32_read_socket): When the WM_SETTINGCHANGE is received, call 'w32_get_mouse_wheel_vertical_delta'. (w32_initialize): Call 'w32_get_mouse_wheel_vertical_delta' at startup. * src/nsterm.m (syms_of_nsterm): * src/haikuterm.c (syms_of_haikuterm): * src/xterm.c (syms_of_xterm): Remove window-system specific variables for coalescing mwheel events. * src/keyboard.c (syms_of_keyboard) : New variable, to replace the above platform-specific ones. * doc/lispref/commands.texi (Misc Events): Improve wording of the description of mouse-wheel events. --- src/w32fns.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/w32fns.c') diff --git a/src/w32fns.c b/src/w32fns.c index c1686beaaa9..65463b52616 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -5173,6 +5173,13 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) my_post_msg (&wmsg, hwnd, msg, wParam, lParam); goto dflt; + case WM_SETTINGCHANGE: + /* Inform the Lisp thread that some system-wide setting has + changed, so if Emacs is interested in some of them, it could + update its internal values. */ + my_post_msg (&wmsg, hwnd, msg, wParam, lParam); + goto dflt; + case WM_SETFOCUS: dpyinfo->faked_key = 0; reset_modifiers (); -- cgit v1.2.1