Skip to content

Commit

Permalink
Fixed old variable left over.
Browse files Browse the repository at this point in the history
Fixed variable overlaping.
  • Loading branch information
BHamrick1 committed May 18, 2016
1 parent 60021fc commit b6eecbf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,14 @@ void scrollMouse(int x, int y)
xdir = 7;
}

for (int x = 0; x < abs(scroll.x); x++) {
for (int xi = 0; xi < abs(x); xi++) {
XTestFakeButtonEvent(display, xdir, 1, CurrentTime);
XTestFakeButtonEvent(display, xdir, 0, CurrentTime);
}

for (int y = 0; y < abs(scroll.y); y++) {
XTestFakeButtonEvent(display, ydir, 1, CurrentTime);
XTestFakeButtonEvent(display, ydir, 0, CurrentTime);
for (int yi = 0; yi < abs(y); yi++) {
YTestFakeButtonEvent(display, ydir, 1, CurrentTime);
YTestFakeButtonEvent(display, ydir, 0, CurrentTime);
}

XFlush(display);
Expand Down

0 comments on commit b6eecbf

Please sign in to comment.