summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/main_gui.c b/main_gui.c
index 3a9564d08..2e0653de9 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -2317,6 +2317,18 @@ static void MainWindowWndProc(Window *w, WindowEvent *e)
}
e->keypress.cont = false;
break;
+
+ case WE_SCROLL: {
+ ViewPort *vp = IsPtInWindowViewport(w, _cursor.pos.x, _cursor.pos.y);
+
+ if (vp == NULL) {
+ _cursor.fix_at = false;
+ _scrolling_viewport = false;
+ }
+
+ WP(w, vp_d).scrollpos_x += e->scroll.delta.x << vp->zoom;
+ WP(w, vp_d).scrollpos_y += e->scroll.delta.y << vp->zoom;
+ } break;
}
}