summaryrefslogtreecommitdiff
path: root/src/imlib.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-11-04 22:01:55 +0100
committerDaniel Friesel <derf@finalrewind.org>2018-11-04 22:01:55 +0100
commit73c11d8aac91ebf71803c57be333ab9559aaa3f1 (patch)
tree6feba15f77b5ef4334dee645870567c17b2dd415 /src/imlib.c
parentbc8f6d804edb3f84bdcfbf30b7141ba462695876 (diff)
parent4eb72706ebd0635d23e96bdde7b6f9612d18d4c5 (diff)
Merge branch 'no-inplace-edit' of https://github.com/ulteq/feh into ulteq-no-inplace-edit
Diffstat (limited to 'src/imlib.c')
-rw-r--r--src/imlib.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/imlib.c b/src/imlib.c
index 18547a9..2c04128 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -1204,6 +1204,22 @@ void feh_edit_inplace(winwidget w, int op)
if (!w->file || !w->file->data || !FEH_FILE(w->file->data)->filename)
return;
+ if (opt.no_inplace_edit) {
+ imlib_context_set_image(w->im);
+ if (op == INPLACE_EDIT_FLIP)
+ imlib_image_flip_vertical();
+ else if (op == INPLACE_EDIT_MIRROR)
+ imlib_image_flip_horizontal();
+ else {
+ imlib_image_orientate(op);
+ tmp = w->im_w;
+ FEH_FILE(w->file->data)->info->width = w->im_w = w->im_h;
+ FEH_FILE(w->file->data)->info->height = w->im_h = tmp;
+ }
+ winwidget_render_image(w, 1, 0);
+ return;
+ }
+
if (!strcmp(gib_imlib_image_format(w->im), "jpeg") &&
!path_is_url(FEH_FILE(w->file->data)->filename)) {
feh_edit_inplace_lossless(w, op);