input: Read row/col position when processing mouse wheel

This commit is contained in:
Thiago de Arruda 2015-01-14 16:59:54 -03:00
parent 8596776bf6
commit 7b537ffda9

View File

@ -223,7 +223,8 @@ static unsigned int handle_mouse_event(char **ptr, uint8_t *buf,
mouse_code = buf[5];
}
if (mouse_code < KE_LEFTMOUSE || mouse_code > KE_RIGHTRELEASE) {
if (!((mouse_code >= KE_LEFTMOUSE && mouse_code <= KE_RIGHTRELEASE)
|| (mouse_code >= KE_MOUSEDOWN && mouse_code <= KE_MOUSERIGHT))) {
return bufsize;
}