]>
Commit | Line | Data |
---|---|---|
3b344ab5 JP |
1 | From c7f341addb76d5e6fd8c24c666d8fe97c451a4cb Mon Sep 17 00:00:00 2001 |
2 | From: Moritz Lipp <mail@mlq.me> | |
3 | Date: Thu, 7 May 2020 20:42:01 +0200 | |
4 | Subject: [PATCH] Update to mupdf 1.17 | |
5 | ||
6 | --- | |
7 | zathura-pdf-mupdf/index.c | 4 +++- | |
8 | zathura-pdf-mupdf/links.c | 5 +++-- | |
9 | 2 files changed, 6 insertions(+), 3 deletions(-) | |
10 | ||
11 | diff --git a/zathura-pdf-mupdf/index.c b/zathura-pdf-mupdf/index.c | |
12 | index c421f5c..cbbe978 100644 | |
13 | --- a/zathura-pdf-mupdf/index.c | |
14 | +++ b/zathura-pdf-mupdf/index.c | |
15 | @@ -65,9 +65,11 @@ build_index(fz_context* ctx, fz_document* document, fz_outline* outline, girara_ | |
16 | float x = 0; | |
17 | float y = 0; | |
18 | ||
19 | + fz_location location = fz_resolve_link(ctx, document, outline->uri, &x, &y); | |
20 | + | |
21 | type = ZATHURA_LINK_GOTO_DEST; | |
22 | target.destination_type = ZATHURA_LINK_DESTINATION_XYZ; | |
23 | - target.page_number = fz_resolve_link(ctx, document, outline->uri, &x, &y); | |
24 | + target.page_number = location.page; | |
25 | target.left = x; | |
26 | target.top = y; | |
27 | target.zoom = 0.0; | |
28 | diff --git a/zathura-pdf-mupdf/links.c b/zathura-pdf-mupdf/links.c | |
29 | index 99c5715..157f039 100644 | |
30 | --- a/zathura-pdf-mupdf/links.c | |
31 | +++ b/zathura-pdf-mupdf/links.c | |
32 | @@ -54,10 +54,11 @@ pdf_page_links_get(zathura_page_t* page, void* data, zathura_error_t* error) | |
33 | float x = 0; | |
34 | float y = 0; | |
35 | ||
36 | + fz_location location = fz_resolve_link(mupdf_document->ctx, mupdf_document->document, link->uri, &x, &y); | |
37 | + | |
38 | type = ZATHURA_LINK_GOTO_DEST; | |
39 | target.destination_type = ZATHURA_LINK_DESTINATION_XYZ; | |
40 | - target.page_number = fz_resolve_link(mupdf_document->ctx, | |
41 | - mupdf_document->document, link->uri, &x, &y); | |
42 | + target.page_number = location.page; | |
43 | target.left = x; | |
44 | target.top = y; | |
45 | target.zoom = 0.0; | |
46 | -- | |
47 | 2.26.0 | |
48 |