Skip to content

Commit

Permalink
Merge pull request #331 from zusorio/horizontal-scroll
Browse files Browse the repository at this point in the history
Set correct button codes for horizontal scrolling
  • Loading branch information
totaam authored Nov 27, 2024
2 parents 21e283c + c311d52 commit ef706d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions html5/js/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1803,7 +1803,7 @@ class XpraClient {
const apy = Math.abs(py);
if (this.server_precise_wheel) {
if (apx > 0) {
const button_x = px >= 0 ? 6 : 7;
const button_x = px >= 0 ? 7 : 6;
const xdist = Math.round((px * 1000) / 120);
this.send([PACKET_TYPES.wheel_motion, wid, button_x, -xdist, [x, y], modifiers, buttons]);
}
Expand All @@ -1828,7 +1828,7 @@ class XpraClient {
//send synthetic click+release as many times as needed:
let wx = Math.abs(this.wheel_delta_x);
let wy = Math.abs(this.wheel_delta_y);
const button_x = this.wheel_delta_x >= 0 ? 6 : 7;
const button_x = this.wheel_delta_x >= 0 ? 7 : 6;
const button_y = this.wheel_delta_y >= 0 ? 5 : 4;
while (wx >= 120) {
wx -= 120;
Expand Down

0 comments on commit ef706d2

Please sign in to comment.