We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d662ab commit 4b20e06Copy full SHA for 4b20e06
src/events.c
@@ -543,14 +543,8 @@ static void feh_event_handle_MotionNotify(XEvent * ev)
543
544
winwid = winwidget_get_from_window(ev->xmotion.window);
545
if (winwid) {
546
- if (ev->xmotion.x > winwid->click_offset_x)
547
- winwid->zoom = winwid->old_zoom + (
548
- ((double) ev->xmotion.x - (double) winwid->click_offset_x)
549
- / 128.0);
550
- else
551
- winwid->zoom = winwid->old_zoom - (
552
- ((double) winwid->click_offset_x - (double) ev->xmotion.x)
553
+ winwid->zoom = winwid->old_zoom *
+ exp((double)(ev->xmotion.x - winwid->click_offset_x) / 128.0);
554
555
if (winwid->zoom < ZOOM_MIN)
556
winwid->zoom = ZOOM_MIN;
0 commit comments