From: Akihiro Sagawa sagawa.aki@gmail.com
--- server/queue.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/server/queue.c b/server/queue.c index 520659d377c..86f76a66a1f 100644 --- a/server/queue.c +++ b/server/queue.c @@ -823,11 +823,15 @@ static struct message *find_mouse_message( struct thread_input *input, const str static int merge_mousewheel( struct thread_input *input, const struct message *msg ) { struct message *prev; + short delta;
if (!(prev = find_mouse_message( input, msg ))) return 0; if (prev->x != msg->x || prev->y != msg->y) return 0; /* don't merge if cursor has moved */
- prev->wparam += msg->wparam; /* accumulate wheel delta */ + /* accumulate wheel delta */ + delta = GET_WHEEL_DELTA_WPARAM(prev->wparam) + GET_WHEEL_DELTA_WPARAM(msg->wparam); + + prev->wparam = MAKEWPARAM(GET_KEYSTATE_WPARAM(msg->wparam), delta); prev->lparam = msg->lparam; prev->x = msg->x; prev->y = msg->y;