mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 05:36:00 +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)
|
if(!Zathura.PDF.document)
|
||||||
pthread_exit(NULL);
|
pthread_exit(NULL);
|
||||||
|
|
||||||
|
intptr_t t = (intptr_t) parameter;
|
||||||
|
int begin_page = (int) t;
|
||||||
|
|
||||||
int page;
|
int page;
|
||||||
for(page = 0; page < Zathura.PDF.number_of_pages; page++)
|
for(page = 0; page < Zathura.PDF.number_of_pages; page++)
|
||||||
{
|
draw((begin_page + page) % Zathura.PDF.number_of_pages);
|
||||||
draw(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
pthread_exit(NULL);
|
pthread_exit(NULL);
|
||||||
}
|
}
|
||||||
|
@ -1272,7 +1273,8 @@ bcmd_zoom(char* buffer, Argument* argument)
|
||||||
if(Zathura.PDF.render_thread)
|
if(Zathura.PDF.render_thread)
|
||||||
pthread_cancel(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();
|
update_status();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue