mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-02-27 18:34:39 +01:00
Increase min difference to 2
Apparently this works around issue #94 for some people. Thanks to Consus for the workaround.
This commit is contained in:
parent
efa2b6d8ed
commit
f04dc0062f
1 changed files with 8 additions and 3 deletions
|
@ -1692,9 +1692,14 @@ adjust_view(zathura_t* zathura)
|
|||
unsigned int new_cell_height = 0, new_cell_width = 0;
|
||||
zathura_document_get_cell_size(zathura->document, &new_cell_height, &new_cell_width);
|
||||
|
||||
/* if the change in zoom changes page cell dimensions by at least one pixel, render */
|
||||
if (abs((int)new_cell_width - (int)cell_width) > 1 ||
|
||||
abs((int)new_cell_height - (int)cell_height) > 1) {
|
||||
/*
|
||||
* XXX requiring a larger difference apparently circumvents #94 for some users; this is not a
|
||||
* proper fix
|
||||
*/
|
||||
static const unsigned int min_change = 2;
|
||||
/* if the change in zoom changes page cell dimensions, render */
|
||||
if (abs((int)new_cell_width - (int)cell_width) > min_change ||
|
||||
abs((int)new_cell_height - (int)cell_height) > min_change) {
|
||||
render_all(zathura);
|
||||
refresh_view(zathura);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue