Currently, zathura crashes while performing ':close' command with the
following error:
GThread-ERROR **: file gthread-posix.c: line 226
(g_cond_free_posix_impl): error 'Device or resource busy' during
'pthread_cond_destroy ((pthread_cond_t *) cond)'
The error is because 'render' thread holds condition variable while
waiting for new pages to render. This patch modifies zathura's code to
correctly kill render thread and free allocated resources when the
document is being closed.
NOTE: should be applied on top of "Allow changing of "pages-per-row"
variable at runtime" commit to avoid conflicts in the
'page_view_set_mode()' function.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
This patch fixes a couple of GString related memory leaks. There is one
left in the cmd_set() function for the 's' type settings, but to fix it
we need to rework settings architecture a bit.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
Currently, 'page', 'offset' and 'scale' are reserved bookmark names.
We should not allow to set arbitary bookmarks with such names.
Also, this patch fixes memory leaks in the cmd_bookmark() function.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
My previous patch a206e5bb1f
(Save zoom level in the bookmarks file) added third varible with special
meaning into the bookmarks file. Add it to the exception list.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
This patch introduces new configuration option: save_zoom_level.
If this option is set (default) zathura will store zoom level
in the bookmarks file on quit and restore it on open.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>