aboutsummaryrefslogtreecommitdiff
path: root/src/imv.c
AgeCommit message (Collapse)Author
2021-07-29Scale fonts when Wayland updates scaling factorIvan Oleynikov
Before this commit, the code in src/wl_window.c seemed to handle the Wayland scaling [1] correctly, it was sending resize events to imv to update the buffer size accordingly. One thing it didn't update is the scaling of fonts that Pango renders on Cairo. This commit simply forwards the scaling factor (computed as [1] requests) together with updated buffer dimentions in resize event, and when the resize event is handled it calls cairo_surface_set_device_scale to notify Pango/Cairo of the scaling. For X11, I simply assume the scaline factor is always 1. This seems to be what the old code did: `grep scale src/x11_window.c` gives no matches. AFAIK, X11 does not have an established way of telling clients what scaling factor to use (and never updates it at runtime). [1]: https://wayland-book.com/surfaces-in-depth/hidpi.html
2020-12-17Fix first/last image indexing bugHarry Jeffery
Fixes #301
2020-12-17Add include limits.hMatthias Coppens
2020-12-02imv: don't rely on glibc's lack of FILE sync on exit.Érico Rolim
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-11-16imv, ipc: improve error checking for ipc creation.Érico Rolim
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-16imv: fix stdin prompt and use fputs.Érico Rolim
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-08-31Fix bug handling multi-key bindsHarry Jeffery
2020-08-31colored overlay: config options in man, split rgbaAndreas Stallinger
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-31colored overlayAndreas Stallinger
* 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-06-12Reset transforms on image switch.Anton Älgmyr
2020-06-12Unify rotation commands, reset transformation properlyAnton Älgmyr
2020-06-12Add rotation and flipping commands.Anton Älgmyr
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-05-21fix nearest_neighbour upscaling methodnycex
2019-09-02console: Use icu to provide proper UTF-8 editingHarry Jeffery
2019-08-30source: Refactor out common async logicHarry Jeffery
2019-08-28imv: Warn about legacy bind syntaxHarry Jeffery
2019-08-28imv: Add aliases to improve backwards compatibility with v3Harry Jeffery
2019-08-25Added crop scaling methodSebastian Parborg
Added a method that scales and crop the image so that the image will fill the whole window. Also made viewport update respect the current scaling mode.
2019-08-25Add initial_pan option to set the starting pan positionSebastian Parborg
2019-08-25Add upscaling method commandSebastian Parborg
This works the same way as the existing scale command except that it changes the upscaling method. Also did some code reduction on the scaling command.
2019-08-24imv: Move keyboard handling into window subsystemHarry Jeffery
This is required as key repeating is going to need to be handled locally on Wayland, which means a slight refactor.
2019-08-23wl_window: Maintain keyboard modifiers stateHarry Jeffery
2019-08-23Fix out of date scaling command defaultsHarry Jeffery
2019-08-23Update default configHarry Jeffery
2019-08-21imv: Use generic list for backends, not a linked listHarry Jeffery
2019-08-18imv: Add -c option to specify commands to run at startupHarry Jeffery
2019-08-18imv: Add bind commandHarry Jeffery
2019-08-18x11_window: Use XCB to load keymapHarry Jeffery
2019-08-16imv: Add index/all argument to close commandHarry Jeffery
2019-08-16Fix misspelling of slideshow_duration environment variablerien333
I noticed that echoing `$imv_slideshow_duration` always came up blank. Turns out, it's misspelled in imv.c. Correcting the spelling mistake makes it behave as expected.
2019-08-15imv: Add imv_pid environment variableHarry Jeffery
2019-08-15imv_load_config: Fix memory leakHarry Jeffery
2019-08-15imv: Fix backend chain memory leakHarry Jeffery
2019-08-15binds: Fix memory leakHarry Jeffery
2019-08-13Wayland: Detect keyboard layout automaticallyHarry Jeffery
2019-08-12Fix background color bugHarry Jeffery
2019-08-07Update man pagesHarry Jeffery
2019-08-07ipc: Add ipc support to imvHarry Jeffery
2019-08-07Don't quit when out of imagesHarry Jeffery
2019-08-07navigator: Use generic list implementationHarry Jeffery
2019-08-07Make aliases smarterHarry Jeffery
2019-08-07imv: Improve slideshow commandHarry Jeffery
2019-08-07Add background colour commandHarry Jeffery
2019-08-07Rename some commands, and add some aliasesHarry Jeffery
2019-07-30Rename select_rel and select_abs to next,prev,gotoHarry Jeffery
2019-07-19Improve command prompt formattingHarry Jeffery
2019-07-15Kill old debug loggingHarry Jeffery
2019-07-15Fix next frame commandHarry Jeffery
2019-07-13Remove OpenGL awareness from core logicHarry Jeffery
2019-07-13Implement scroll inputHarry Jeffery