Fixes#276
Instead of rendering the entire filename at once, Xft will let us do it
character by character. This will allow sxiv to query fontconfig for
a font that can provide any missing codepoints, if needed.
A known issue of this patch is that the "..." dots rendering will not
work properly for very long multibyte filenames. That is because we
cannot easily predict the final width of the rendered filename before
drawing it. I couldn't figure out a clean way to deal with this, so I
ended up just truncating the offending filenames.
None of the mouse mappings uses a keyboard modifier, making it possible to
access the most basic features by only using the mouse.
Next/previous image with left button depending on cursor position, middle
button for dragging, right button for switching to thumnail mode and wheel for
zooming.
Users can keep the old behaviour by simply not adapting the changes to the
buttons array in config.def.h to their config.h file.
mv(1) inside the same filesystem was not detected.
Supporting this case made it necessary to always watch the directory. Turns out
the logic and state keeping between arl_setup() and arl_handle() is easier,
when using different watch descriptors for the file and the directory and not
using a oneshot descriptor for the file.
Requiring an absolute canonical path for arl_setup() simplifies dir and base
name splitting. No need for dirname(3) and basename(3) anymore.
Make the header only contain the public interface and nothing from the
implementation. All functions get a handle to their self object, like the img_
and tns_ and win_ functions. All necessary data (file path) is also passed as
an argument, so that no extern redeclarations are needed.
Make arl_setup_dir() private, it's not called outside the module.
Make arl_handle() return true if the file has changed, so that the reloading of
the file can be done by the caller.
Misbehaving command lines in the key-handler that rewrite the given files and
thus replace symbolic links instead of their targets shall call realpath(1).
Fixes issue #205 and reverts commit 92e3b578.
- Functions warn() and die() replaced by GNU-like error(3) function
- Register cleanup() with atexit(3)
- Functions called by cleanup() are marked with CLEANUP and are not allowed to
call exit(3)
- Only load the thumbnails that are currently visible in the window
- Unload thumbnails that are leaving the visible area
- Much less memory needed, but scrolling is now slower
- This also unintentionally fixes issue #86