app: support horizontal scrolling on Windows and Linux

Fixes #181.

Signed-off-by: pierre <pierre.curto@gmail.com>
This commit is contained in:
Pierre Curto
2020-11-26 18:37:00 +01:00
committed by Elias Naur
parent 4f8150cd59
commit 4c3de5f5d2
3 changed files with 19 additions and 3 deletions
+9
View File
@@ -346,6 +346,15 @@ func (h *x11EventHandler) handleEvents() bool {
// scroll down
ev.Type = pointer.Scroll
ev.Scroll.Y = +scrollScale
case 6:
// http://xahlee.info/linux/linux_x11_mouse_button_number.html
// scroll left
ev.Type = pointer.Scroll
ev.Scroll.X = -scrollScale * 2
case 7:
// scroll right
ev.Type = pointer.Scroll
ev.Scroll.X = +scrollScale * 2
default:
continue
}