Add a widget derived from GtkDrawingArea that handles the drawing. It
automaticaly requests rerendering of the page if necessary (i.e on a scroll and
rotate).
This should solve all the rendering issues.
The patch fixes the following warning:
document.c: In function ‘guess_type’:
document.c:174: warning: implicit declaration of function ‘read’
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
We need to know the document's 'scale' value earlier (before cairo
surfaces are created). Otherwise, cairo surfaces will be re-created and
wrong page will be rendered (since zoom doesn't preserve page number).
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
It never returns NULL. If this function fails, the application is
terminated.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
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>
* We don't fail if we can't load a plugin. There can be anything.
* Reintroduce the command line parser from glib.
* Use fstatat as it is more reliable than d_type from dirent.