diff --git a/src/linux/window_manager/linux_window_manager.c b/src/linux/window_manager/linux_window_manager.c index 412ebdf5..81f5c609 100644 --- a/src/linux/window_manager/linux_window_manager.c +++ b/src/linux/window_manager/linux_window_manager.c @@ -1328,12 +1328,15 @@ wm_get_events(Arena *arena, B32 wait) e->pos = v2f32((F32)evt.xbutton.x, (F32)evt.xbutton.y); } else if(evt.xbutton.button == Button4 || - evt.xbutton.button == Button5) + evt.xbutton.button == Button5 || + evt.xbutton.button == 6 || + evt.xbutton.button == 7) { WM_Event *e = wm_event_list_push_new(arena, &evts, WM_EventKind_Scroll); e->window.u64[0] = (U64)window; e->modifiers = modifiers; - e->delta = v2f32(0, evt.xbutton.button == Button4 ? -1.f : +1.f); + e->delta = v2f32(evt.xbutton.button == 6 ? -120.f : evt.xbutton.button == 7 ? +120.f : 0.f, + evt.xbutton.button == Button4 ? -120.f : evt.xbutton.button == Button5 ? +120.f : 0.f); e->pos = v2f32((F32)evt.xbutton.x, (F32)evt.xbutton.y); } } diff --git a/src/ui/ui_core.c b/src/ui/ui_core.c index bc4f58a4..43f5d13b 100644 --- a/src/ui/ui_core.c +++ b/src/ui/ui_core.c @@ -2957,7 +2957,7 @@ ui_signal_from_box(UI_Box *box) { Swap(F32, delta.x, delta.y); } - Vec2S16 delta16 = v2s16((S16)(delta.x/30.f), (S16)(delta.y/30.f)); + Vec2S16 delta16 = v2s16((S16)(delta.x/40.f), (S16)(delta.y/40.f)); if(delta.x > 0 && delta16.x == 0) { delta16.x = +1; } if(delta.x < 0 && delta16.x == 0) { delta16.x = -1; } if(delta.y > 0 && delta16.y == 0) { delta16.y = +1; }