summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-form.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-11-14 15:04:29 +0100
committerTor Andersson <tor.andersson@artifex.com>2016-11-14 18:13:08 +0100
commit55b20c348352b2d5e3bf802bc57fae6b850ff674 (patch)
treeaffc6623de00b11f4694399ebc30d55968f3dbe5 /source/pdf/pdf-form.c
parent0666bc342b391dbb80dfa4c8812c010bdc00afc0 (diff)
downloadmupdf-55b20c348352b2d5e3bf802bc57fae6b850ff674.tar.xz
pdf: Don't pass form UI events to link annotations.
Don't try handling them both as links and form widgets.
Diffstat (limited to 'source/pdf/pdf-form.c')
-rw-r--r--source/pdf/pdf-form.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/pdf/pdf-form.c b/source/pdf/pdf-form.c
index f4c5278c..02f0d87d 100644
--- a/source/pdf/pdf-form.c
+++ b/source/pdf/pdf-form.c
@@ -596,14 +596,21 @@ int pdf_pass_event(fz_context *ctx, pdf_document *doc, pdf_page *page, pdf_ui_ev
break;
}
+ /* Skip hidden annotations. */
if (annot)
{
int f = pdf_to_int(ctx, pdf_dict_get(ctx, annot->obj, PDF_NAME_F));
-
if (f & (PDF_ANNOT_IS_HIDDEN|PDF_ANNOT_IS_NO_VIEW))
annot = NULL;
}
+ /* Skip Link annotations. */
+ if (annot)
+ {
+ if (pdf_name_eq(ctx, pdf_dict_get(ctx, annot->obj, PDF_NAME_Subtype), PDF_NAME_Link))
+ annot = NULL;
+ }
+
switch (ui_event->etype)
{
case PDF_EVENT_TYPE_POINTER: