Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
{"force-aliasing", 0, 0, OPTION_force_aliasing},
{"no-fehbg" , 0, 0, OPTION_no_fehbg},
{"keep-zoom-vp" , 0, 0, OPTION_keep_zoom_vp},
{"keep-offset" , 0, 0, OPTION_keep_offset},
{"scroll-step" , 1, 0, OPTION_scroll_step},
{"xinerama-index", 1, 0, OPTION_xinerama_index},
{"insecure" , 0, 0, OPTION_insecure},
Expand Down Expand Up @@ -796,6 +797,9 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
case OPTION_keep_zoom_vp:
opt.keep_zoom_vp = 1;
break;
case OPTION_keep_offset:
opt.keep_offset = 1;
break;
case OPTION_scroll_step:
opt.scroll_step = atoi(optarg);
break;
Expand Down
2 changes: 2 additions & 0 deletions src/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ struct __fehoptions {
unsigned char text_bg;
unsigned char no_fehbg;
unsigned char keep_zoom_vp;
unsigned char keep_offset;
unsigned char insecure_ssl;
unsigned char filter_by_dimensions;
unsigned char edit;
Expand Down Expand Up @@ -221,6 +222,7 @@ OPTION_zoom_step,
OPTION_zoom_in_rate,
OPTION_zoom_out_rate,
OPTION_keep_zoom_vp,
OPTION_keep_offset,
OPTION_no_screen_clip,
OPTION_index_info,
OPTION_magick_timeout,
Expand Down
4 changes: 4 additions & 0 deletions src/slideshow.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,10 @@ void slideshow_change_image(winwidget winwid, int change, int render)
winwidget_reset_image(winwid);
winwid->im_w = w;
winwid->im_h = h;
if(opt.keep_offset) {
winwid->im_x = opt.offset_x;
winwid->im_y = opt.offset_y;
}
if (render) {
winwidget_render_image(winwid, 1, 0);
}
Expand Down