Commit graph

772 commits

Author SHA1 Message Date
Harry Jeffery 1b85ba53b0 Wayland: Perform display roundtrip after changing scale
Fixes #305
2021-01-09 16:15:10 +00:00
Harry Jeffery a4bb341a9b Release v4.2.0 2020-12-17 20:30:42 +00:00
Harry Jeffery 49ba898e92 Fix first/last image indexing bug
Fixes #301
2020-12-17 20:18:09 +00:00
Matthias Coppens e3f135a0ad Add include limits.h 2020-12-17 19:48:00 +00:00
Mark Stosberg df51acbf15 Add default keybinding for image rotation
This is the same key binding used by Eye of Gnome for a 90 degree clockwise image rotation for people coming from that image viewer.
2020-12-03 01:19:58 +00:00
Scott Moreau 91e06fff2d wayland: Fix initial black screen due to size of 0x0
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/master/stable/xdg-shell/xdg-shell.xml#L1037
states regarding xdg_toplevel.configure "The width and height arguments specify a hint to the window". imv
was using these dimensions even if they are 0x0, which is valid for the compositor to send. Clearly this is
a bad hint and should be ignored. This patch does that, and fixes #293.
2020-12-02 00:20:01 +00:00
Stephan Lachnit 84a1f7aa83 Use system inih if available
* inih is now widely available as a system library
* if not, a fallback from Wrap DB can be used

Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
2020-12-02 00:19:14 +00:00
Érico Rolim 82960d3c41 imv: don't rely on glibc's lack of FILE sync on exit.
This issue was spotted on musl, where killing imv with the Q shortcut
while it was waiting for image paths in stdin led to the application
hanging until stdin received an EOF manually with ^D, since the stdin
stream was locked by the fgets() function.

Switching to pipes and a helper thread allows us to use read() for
reading from STDIN_FILENO while still taking advantage of the fgets()
logic for handling newlines and buffer size. read() is a thread
cancellation point (fgets() is only an optional one), which makes it
possible to cancel the helper thread cleanly and force the thread using
fgets() to exit when the write-end of the pipe it's reading from is
closed.
2020-12-02 00:11:51 +00:00
Érico Rolim 489421b9e7 imv, ipc: improve error checking for ipc creation.
Since this isn't essential functionality, it's ok to simply not provide
it. In cases where XDG_RUNTIME_DIR was empty (but not unset) or set to a
directory where the user didn't have write permissions, socket creation
would fail and lead to segmentation faults in imv, due to the return
value of imv_ipc_create() not being checked.
2020-11-16 22:12:07 +00:00
Érico Rolim 6cb2b8495f imv: fix stdin prompt and use fputs.
Add newline to the prompt for reading paths from stdin.

Since string formatting isn't being used, it's possible to use fputs()
directly in the logging callback in imv.c.
2020-11-16 22:11:32 +00:00
Harry Jeffery ac331f12fa Document 'crop' scaling mode 2020-11-16 22:08:21 +00:00
Érico Rolim 5a28494594 .builds/ubuntu.yml: fix image name. 2020-11-16 22:02:29 +00:00
Simon Ser cb7b5fcd5d Make tests and man pages optional
Allows to build imv without these extra features.
2020-11-16 22:01:46 +00:00
Harry Jeffery 0131ab6f97 Fix bug handling multi-key binds 2020-08-31 14:21:24 +01:00
Torstein Husebø 90cc7adbd2 treewide: fix typos 2020-08-31 13:56:50 +01:00
Harry Jeffery e18b7bca0b Add missing documentation for overlay_position_bottom 2020-08-31 13:58:01 +01:00
Andreas Stallinger df0d1cf7c2 colored overlay: config options in man, split rgba
split color_rgba into color_rgb and alpha
added configuration options to man pages

cleanup gitignore: the man pages output is now in the build directory,
so there is no to ignore man pages individually
2020-08-31 13:53:03 +01:00
Andreas Stallinger d1e4f7fcff colored overlay
* first steps for colored overlay
* overlay color wip
* add option for overlay position
    if overlay_positiion_bottom is true overlay is at the bottom
* remove enum for overlay position
2020-08-31 13:53:03 +01:00
Tuomas Siipola afe155dcea Support rotate and flip commands on SVG 2020-07-21 01:54:17 +01:00
Andreas Stallinger bb4a609cc0 FreeBSD: use librsvg2-rust instead of librsvg2
the library is rewritten in rust and on freebsd there is an other
package for it.
2020-07-21 01:52:50 +01:00
Clownacy 61533df66c Sort directory entries alphabetically
Previously, they would be sorted by however readdir returned them.

I suppose a proper configuration option to control sorting would be
nice, but for now, I think replacing forced random order with forced
alphabetical order is an improvement.
2020-07-21 01:52:17 +01:00
Aleksei Bavshin 500a6b3acc Use private mapping for memfd with keymap.
mmap with MAP_SHARED would fail if the compositor provides a read-only
descriptor with keymap. And at least weston applies F_SEAL_WRITE to the
memfd if supported by the platform.

Fixes #263
2020-07-21 01:50:01 +01:00
Manuel Zimmermann 767ce08307 README: Improve build instructions
The .gitignore file ignores the directory build/, therefore it makes
most sense to use this directory in the example as well.
2020-07-21 01:47:55 +01:00
Tuomas Siipola ebcca13452 Fix XVisualInfo leak
It's not documented when this value should be freed but other GLX
applications free it here.
2020-07-21 01:47:24 +01:00
Tuomas Siipola b37902d438 Fix X11 window cleanup 2020-07-21 01:47:24 +01:00
Tuomas Siipola d457ced783 Fix keymap leak 2020-07-21 01:47:24 +01:00
Tuomas Siipola a200fbf945 Fix librsvg usage to prevent memory leak
Calling `rsvg_handle_close` doesn't do anything here because the handle
is already constructed with data or file. `g_object_unref` is called
instead to free memory.
2020-07-21 01:47:24 +01:00
Carlo Abelli 32c33c028d Add libheif dependency to readme 2020-07-21 01:46:14 +01:00
Kenny Levinsen ef2231b7d0 wayland: Do not commit surface until configure 2020-07-21 01:45:53 +01:00
Kenny Levinsen 05a4d5b359 wayland: Use wl_display_roundtrip to wait for globals 2020-07-21 01:45:53 +01:00
Aleksei Bavshin f6046f8bb4 Fix double-quoted version when building without git
Use pkg-config for libtiff dependency

Fixes #228
2020-06-12 01:07:16 +01:00
Anton Älgmyr 8fac7401bc Make rotation clockwise
The documentation already stated that it should be clockwise,
seems like I switched/intended to switch and some point.
2020-06-12 01:00:10 +01:00
Anton Älgmyr 19ed1931be Reset transforms on image switch. 2020-06-12 01:00:10 +01:00
Anton Älgmyr a71709b889 Unify rotation commands, reset transformation properly 2020-06-12 01:00:10 +01:00
Anton Älgmyr f968eb420c Add rotation and flipping commands.
Rotation can be done by any amount (not limited to multiples of 90).
Commands allow flipping horizontally and vertically.
The flips are done relative to the current rotation.
2020-06-12 01:00:10 +01:00
Carlo Abelli eb60fefc3b Add HEIF support
Support the HEIF format using libheif.
2020-05-21 11:31:04 +01:00
nycex bdfa1fcbae fix nearest_neighbour upscaling method 2020-05-21 11:22:47 +01:00
Robert Sacks a8c1ffa3cf Fix memory leak in imv_event structure 2020-05-21 11:20:35 +01:00
Eric Engestrom 04ef9440fb drop the old Makefile and update the docs 2020-02-08 00:29:25 +00:00
Eric Engestrom 2dd0c1469e test meson in the CI 2020-02-08 00:29:25 +00:00
Eric Engestrom d75b2bc13a add meson build system 2020-02-08 00:29:25 +00:00
Harry Jeffery a222f6475b Release v4.1.0 2019-12-21 22:54:26 +00:00
Harry Jeffery 18f139c371 Update imv.desktop 2019-12-21 22:30:47 +00:00
Paride Legovini f47be4be98 Fix the name of the GNU LGPL 2019-12-21 21:59:15 +00:00
Jason c9b8ec89cc Fix typo in manpages 2019-11-23 14:19:17 +00:00
Ivy Foster 935e5347dd .builds/archlinux.yml: add dependency on libglvnd & glu 2019-11-23 14:15:39 +00:00
Ben Vickery df3c9316a6 Fix 'curl foo | imv -'. Closes #189
Fix to the fix contributed by escondida.
2019-11-23 14:15:39 +00:00
Harry Jeffery dd3d60c3f9 png: Increase max data chunk size 2019-11-05 21:14:17 +00:00
Andreas Stallinger 0c0d26a8c1 navigator relative fix
move from % to division rem
since higher numbers for prev failed
i have "<Shift+P> prev 10" in my configs which was not working properly
2019-10-17 21:13:12 +01:00
Andreas Stallinger 94c95641b6 add somefiles to gitignore
added doc/imv.1 doc/imv.5 doc/imv-msg.txt
and the build folder to the .gitignore
2019-10-17 20:51:27 +01:00