Don't send no-op mouse move and scroll events
This commit is contained in:
parent
7b56ab755d
commit
f8ffb30e1f
1 changed files with 8 additions and 0 deletions
|
|
@ -459,6 +459,10 @@ int LiSendMouseMoveEvent(short deltaX, short deltaY) {
|
|||
return -2;
|
||||
}
|
||||
|
||||
if (deltaX == 0 && deltaY == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
holder = malloc(sizeof(*holder));
|
||||
if (holder == NULL) {
|
||||
return -1;
|
||||
|
|
@ -675,6 +679,10 @@ int LiSendHighResScrollEvent(short scrollAmount) {
|
|||
return -2;
|
||||
}
|
||||
|
||||
if (scrollAmount == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
holder = malloc(sizeof(*holder));
|
||||
if (holder == NULL) {
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue