mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-27 13:16:02 +01:00
Begin re-rendering on current page
This commit is contained in:
parent
229ebe0a29
commit
c009a94cf8
1 changed files with 6 additions and 4 deletions
10
zathura.c
10
zathura.c
|
@ -611,11 +611,12 @@ render(void* parameter)
|
|||
if(!Zathura.PDF.document)
|
||||
pthread_exit(NULL);
|
||||
|
||||
intptr_t t = (intptr_t) parameter;
|
||||
int begin_page = (int) t;
|
||||
|
||||
int page;
|
||||
for(page = 0; page < Zathura.PDF.number_of_pages; page++)
|
||||
{
|
||||
draw(page);
|
||||
}
|
||||
draw((begin_page + page) % Zathura.PDF.number_of_pages);
|
||||
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
@ -1272,7 +1273,8 @@ bcmd_zoom(char* buffer, Argument* argument)
|
|||
if(Zathura.PDF.render_thread)
|
||||
pthread_cancel(Zathura.PDF.render_thread);
|
||||
|
||||
pthread_create(&(Zathura.PDF.render_thread), NULL, render, NULL);
|
||||
intptr_t t = Zathura.PDF.page_number;
|
||||
pthread_create(&(Zathura.PDF.render_thread), NULL, render, (gpointer) t);
|
||||
update_status();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue