summaryrefslogtreecommitdiff
path: root/src/winwidget.c
AgeCommit message (Collapse)AuthorLines
2025-09-09revers winwidget_render_image to the state before v3.11Birte Kristina Friesel-6/+2
It turned out that all fix attempts since 2a90af6d3709dd01c447f18db5109cab86eb4735 were not quite addressing the root cause of the problem, and only trying to fix its symptoms. See 2ac79eae08a5c68d29276c70c01781bd5c25031a for details.
2025-09-09winwidget_resize: Do not call winwidget_get_geometry after XFlushBirte Kristina Friesel-1/+12
While calling winwidget_get_geometry(winwid, NULL); at this point would help alleviate flashing issues that can occur when feh has to render a window two times in a row, or renders the initial image with a resolution that differs from the one that is needed to accomodate the resize. However, it would also break --scale-down in floating setups. As flashing is less annoying, we do not call winwidget_get_geometry. here. Partially reverts 6af56d5411a0ced369d6f8125092fd1a051b497e See also https://github.com/derf/feh/pull/462 Thanks to Awal Garg for several joint debugging sessions.
2025-09-09winwidget_center_image: do not hardcode x/y = 0Birte Kristina Friesel-2/+2
Previously, the zoom_fit / zoom_fill actions would place an image in a non-fullscreen setting at the top-left corner (x/y = 0) if the window was larger than required. Now, the image is centered correctly.
2025-09-08winwidget_render_image: only set x/y :=0 if !scale_down or w/h != im_w/im_hBirte Kristina Friesel-9/+11
This is another fix for 2a90af6d3709dd01c447f18db5109cab86eb4735 that should not have any adverse effects, as it specifically catches the case where --scale-down has caused a window dimension to be equal to an image dimension. Fixes #795 Fixes #796
2025-08-29winwidget_render_image: scale-down: fix fullscreen checkBirte Kristina Friesel-2/+2
We need to check whether the winwidget is fullscreen at the moment, not whether feh was started with --full-screen. Closes #794
2025-08-27Update copyright notesBirte Kristina Friesel-1/+1
2025-08-26scale-down: only reset dx/dy in non-fullscreen modeBirte Kristina Friesel-2/+6
2025-08-26Fix offset calculation when image is larger than screenAwal Garg-2/+6
2023-07-12update copyrightBirte Kristina Friesel-1/+1
2022-08-22winwidget: do not add an inotify watch if file is a urlAnthony Iliopoulos-1/+1
inotify_add_watch calls fail when the file is a url, since it does not correspond to an actual on-disk path. The temporary file path fetched by curl could be kept and monitored, but since this is unlikely to change just avoid monitoring files opened via a url.
2022-01-03Fix spellinga1346054-1/+1
2021-07-25Set correct window size when applying --zoom outside of -. / -FDaniel Friesel-3/+18
Needs further testing
2021-01-09Merge branch 'add-windowid-option' of https://github.com/codehearts/feh into ↵Daniel Friesel-5/+26
codehearts-add-windowid-option
2020-12-05free accompanying EXIF data when freeing an imageDaniel Friesel-1/+2
This fixes two memory bugs that only manifest with exif=1 and long-running slideshows. * when feh loads an image, it writes exif data to file->ed. Previously, this data was never free'd, causing a memory leak on subsequent loads of the same file. * As file->ed is never free'd, the accumulated EXIF data consumes a significant amount of memory over time. with slideshow-delay = 10 and two days of runtime, feh may exceed 1 GB of memory usage. If the slideshow is so large that feh does not encounter the same image twice in this time, this is not detected as a memory leak, as each EXIF data chunk is referenced from the filelist. See <https://github.com/derf/feh/issues/553> for details. Closes #553
2020-08-28Fix segfault when closing a window in multi-window reload modeDaniel Friesel-0/+4
Issue: * start feh --multiwindow --reload 5 * close a window with "x" * wait up to 5 seconds * segfault The issue was caused by the closed window's reload timer still being active even after the winwidget was free'd.
2020-07-24Add windowid option to draw to an existing windowKate Hart-5/+26
This lets `feh` draw the background pixmap of an existing window, opening the door for use with tools like `xscreensaver` or `xsecurelock`
2020-04-11update copyrightDaniel Friesel-1/+1
2019-10-11Allow setting the X11 class hint as an option.Olof-Joachim Frahm-1/+1
2019-07-08Merge branch 'geometry' of https://github.com/CrackedP0t/feh into ↵Daniel Friesel-1/+8
CrackedP0t-geometry
2019-04-18inotify: Support files in current working directoryDaniel Friesel-0/+9
2019-04-18Gracefully handle inotify failuresDaniel Friesel-2/+2
2019-04-18print error string if an inotify operation failsDaniel Friesel-2/+2
2019-04-12Handle no-longer-valid files in inotify-based auto-reloadDaniel Friesel-1/+1
2019-04-01Merge remote-tracking branch 'original/master'Sven Willner-3/+0
2019-03-14Get geometry after mappingElaina Martineau-0/+2
2019-03-14Get actual geometry from Xlib after resizeElaina Martineau-1/+6
2019-02-11remove debug printf3.1.2Daniel Friesel-1/+0
2018-12-23Remove useless assignmentsPavel Shlyak-2/+0
It is a naive way of fixing it :) Needs attentive review
2018-09-13Merge branch 'master' of github.com:derf/fehSven Willner-177/+91
2018-09-13Inotify: watch parent directory instead of just fileSven Willner-12/+13
2018-08-19Antialias rotated images even at native resolutionulteq-1/+1
Partial fix of: #310
2018-07-17Improve screen clip featureulteq-6/+10
2018-06-27Merge branch 'simplify-zoom' of https://github.com/ulteq/feh into ↵Daniel Friesel-157/+56
ulteq-simplify-zoom
2018-05-11Update copyright noticeDaniel Friesel-1/+1
2018-05-11Show correct filelist position in windows opened from thumbnail modeDaniel Friesel-2/+0
Addresses part of issue #75
2018-03-10Adapt the new --offset optionulteq-16/+6
2018-03-10Simplify --keep-zoom-vp handlingulteq-6/+7
2018-03-10Fix indentationulteq-11/+10
2018-03-10Remove unused codeulteq-8/+0
2018-03-10Fix --screen-clip window dimension calculationulteq-2/+6
2018-03-10Fix window auto-resize with --keep-zoom-vp enabledulteq-1/+2
--keep-zoom-vp will no longer block the dynamic window resizing mechanism.
2018-03-10Remove duplicate bounds checkingulteq-6/+0
2018-03-10Run draw checks after zoom calculationulteq-8/+8
2018-03-10Fix draw checks conditionulteq-2/+3
2018-03-10Allow empty string as --geometry argumentulteq-1/+1
Passing an empty string to the --geometry option will enable fixed geometry mode without having to specify anything else
2018-03-10Fix zoom ratio calculationulteq-103/+20
This simplifies the logic behind the automatic zoom ratio calculation, which is used by both --auto-zoom and --scale-down.
2018-03-09rename --inner-geometry to --offset, discard width and height valuesDaniel Friesel-8/+8
2018-03-08add (experimental and still slightly buggy) --inner-geometry featureDaniel Friesel-0/+26
See #278
2018-02-27Merge branch 'custom-background-color' of https://github.com/ulteq/feh into ↵Daniel Friesel-12/+14
ulteq-custom-background-color
2018-02-14Only check image dimensions on the fly in multiwindow and slideshow modeDaniel Friesel-1/+1
This introduces a new feh_should_ignore_image function which is called at appropriate places in those modes to skip images which are loadable but undesired.