summaryrefslogtreecommitdiffstats
path: root/main.c
AgeCommit message (Collapse)Author
2017-10-06Improve mouse supportBert Münnich
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.
2017-10-05Simplify cursor reset in image modeBert Münnich
No need to give cursor name. reset_cursor() is now the only place to decide what cursor to fall back to.
2017-10-04Mouse drag translates pointer position to image areaBert Münnich
This makes mouse panning more direct and faster.
2017-05-17Detect all file overwrites in autoreload_inotifyBert Münnich
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.
2017-05-17Revised autoreload interfaceBert Münnich
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.
2017-05-17Add autoreload support by inotify (and dummy backend nop)Max Voit
2017-05-17Properly quit when window gets closed; fixes issue #27Bert Münnich
2017-02-15Fix typoJakub Wilk
2017-01-07Pass given file names to key-handler instead of real pathsBert Münnich
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.
2016-12-01Merge djhejna/floatdelayBert Münnich
2016-11-30Ignore button and key events while key-handler is runningBert Münnich
Related to issue #253, which originally asked for a non-blocking key-handler.
2016-11-28Support for DELAY as a floating point number including less than 1Don Hejna
second while maintaining backward compatibiitiy with integer arguments.
2016-09-28Allow opening directories non-recursivelyParide Legovini
2016-08-06Use Xft for font loading and text drawingBert Münnich
2016-08-06Provide image width and height to image-info script; fixes issue #159Bert Münnich
2015-10-28Revised error handlingBert Münnich
- 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)
2015-10-28Prefix safe allocation functions with 'e' instead of 's_'Bert Münnich
2015-10-28Removed unnecessary buffer size constantsBert Münnich
2015-10-28Use XSI realpath(3)Bert Münnich
2015-10-28Use POSIX.1-2008 getline(3)Bert Münnich
2015-10-28Removed feature test macro definitions from source filesBert Münnich
2015-10-28Removed overcautious parameter checksBert Münnich
2015-08-19Always run image-info script after key-handler in image mode; fixes issue #213Bert Münnich
2015-01-18Pass real paths to key handler instead of the paths provided by the userBert Münnich
Programs called by the key handler might replace symlinks instead of their targets.
2015-01-04Cache out of view thumbnails in the backgroundBert Münnich
2015-01-04Use bit-field for boolean flags in fileinfo structBert Münnich
2014-12-01Ignore SIGPIPE, caused by key handler exiting before all files got printed, ↵Bert Münnich
fixes issue #188
2014-11-27Pass file paths to key handler via stdin; fixes issue #187Bert Münnich
2014-11-27Fixed leakage of pipe descriptors in case of failing forkBert Münnich
2014-10-24Do not print could-not-open-warnings for files found by directory traversalBert Münnich
2014-10-01Corrected & refactored handling of window bar content...Bert Münnich
Old snprintf calls could have overflowed the buffers.
2014-10-01Fixed segfault on image removal with uninitialized thumbnails; fixes issue #177Bert Münnich
2014-09-30Unified file count variable for image & thumbnail modeBert Münnich
2014-09-27Changed image mark in thumbnail view to small rectangleBert Münnich
2014-09-26Refactored main loop; properly fixes startup issueBert Münnich
2014-09-26Fixed startup in thumbnail mode with floating windowBert Münnich
2014-09-26Revised thumbnail loading...Bert Münnich
- 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
2014-09-11Fixed segfault caused by image removal in thumbnail modeBert Münnich
2014-09-01Simplified img_frame_animateBert Münnich
2014-08-29Corrected i_alternate, fixes issue #171Bert Münnich
2014-08-22Bug #165: Deletion of unnecessary null pointer checksMarkus Elfring
The function "free" performs input parameter validation. http://pubs.opengroup.org/onlinepubs/9699919799/functions/free.html It is therefore not needed to check a passed pointer before this function call. A corresponding update suggestion was generated by the software "Coccinelle" from the following semantic patch approach. http://coccinelle.lip6.fr/ @Remove_unnecessary_pointer_checks1@ expression x; @@ -if (x != \(0 \| NULL\)) free(x); @Remove_unnecessary_pointer_checks2@ expression x; @@ -if (x != \(0 \| NULL\)) { free(x); x = \(0 \| NULL\); -} @Remove_unnecessary_pointer_checks3@ expression a, b; @@ -if (a != \(0 \| NULL\) && b != \(0 \| NULL\)) +if (a) free(b); @Remove_unnecessary_pointer_checks4@ expression a, b; @@ -if (a != \(0 \| NULL\) && b != \(0 \| NULL\)) { +if (a) { free(b); b = \(0 \| NULL\); } Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2014-08-18Further simplified thumbnail marksBert Münnich
2014-08-17Full redraw when removing files during thumbnail reloading; fixes issue #164Bert Münnich
2014-08-16Fixed wrong thumbnail-to-file mappings caused by file deletionsBert Münnich
2014-08-16Pass marked files to external key handler in thumbnail mode; fixes issue #135Bert Münnich
2014-08-16Count number of marked filesBert Münnich
2014-08-16Unified file index variable for image & thumbnail modeBert Münnich
2014-08-16Generalized thumbnail loading, allows easier reloading of thumbnails later onBert Münnich
2014-07-28Overhauled window drawing, yet again; fixes issue #155Bert Münnich
- Buffer for window content is bigger than the window, minimizes artifacts when window is resized - Back to using XSetWindowBackgroundPixmap() instead of XCopyArea(), no need to handle exposure events; X server can show gray background directly after resize event before sxiv redraws the window contents
2014-07-23Added support for multiple commands per key/button mapping; elegant fix for ↵Bert Münnich
issue #150