diff options
author | Daniel Friesel <derf@finalrewind.org> | 2012-03-15 17:40:42 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2012-03-15 17:40:42 +0100 |
commit | 489b73d5f479dce3c70bab50b8663bdf1527b2cf (patch) | |
tree | f69cc1988024f32eb64240c51b6a0bb3e65a14c1 /src | |
parent | 8899df700027280ad34c7ee64f2aadfc3ae8e6c8 (diff) |
scroll keys: Sanitise offsets before rendering
Diffstat (limited to 'src')
-rw-r--r-- | src/keyevents.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/keyevents.c b/src/keyevents.c index 6327320..343b5d1 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -479,34 +479,42 @@ void feh_event_handle_keypress(XEvent * ev) } else if (feh_is_kp(&keys.scroll_right, keysym, state)) { winwid->im_x -= 20; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 1); } else if (feh_is_kp(&keys.scroll_left, keysym, state)) { winwid->im_x += 20; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 1); } else if (feh_is_kp(&keys.scroll_down, keysym, state)) { winwid->im_y -= 20; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 1); } else if (feh_is_kp(&keys.scroll_up, keysym, state)) { winwid->im_y += 20; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 1); } else if (feh_is_kp(&keys.scroll_right_page, keysym, state)) { winwid->im_x -= winwid->w; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 0); } else if (feh_is_kp(&keys.scroll_left_page, keysym, state)) { winwid->im_x += winwid->w; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 0); } else if (feh_is_kp(&keys.scroll_down_page, keysym, state)) { winwid->im_y -= winwid->h; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 0); } else if (feh_is_kp(&keys.scroll_up_page, keysym, state)) { winwid->im_y += winwid->h; + winwidget_sanitise_offsets(winwid); winwidget_render_image(winwid, 0, 0); } else if (feh_is_kp(&keys.jump_back, keysym, state)) { |