]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/xpdf/pdf-document.cc
Fix bugs in the links implementation and change cursor when hovering a
[evince.git] / pdf / xpdf / pdf-document.cc
index a8824e8845036310d9cf57424155ec1a96a777fe..36ad37436a2e40626510fdf0792bc5b689829a29 100644 (file)
@@ -1005,7 +1005,11 @@ pdf_document_get_link (EvDocument *document, int x, int y)
        PdfDocument *pdf_document = PDF_DOCUMENT (document);
        LinkAction *action;
 
-       action = pdf_document->links->find (x, y);
+       y = pdf_document->out->getBitmapHeight() - y;
+
+       action = pdf_document->links->find ((double)x / pdf_document->scale,
+                                           (double)y / pdf_document->scale);
+       
        if (action) {
                return build_link_from_action (pdf_document, action, "");
        } else {