summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2020-12-11 16:44:57 +0000
committerVincent Sanders <vince@kyllikki.org>2020-12-11 16:44:57 +0000
commit89d59a6559c8ae0a05fadeab95adf9fd988c016a (patch)
tree87f8b468f9dec3f6120b2bd1785d8afe22d1be55
parent1df87524974c8d4d76ed1f48b1ed216c7ebe6d4c (diff)
downloadnetsurf-vince/pdf.tar.gz
netsurf-vince/pdf.tar.bz2
fixup pdf content handler for modified interfacesvince/pdf
-rw-r--r--content/handlers/pdf/pdf.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/content/handlers/pdf/pdf.c b/content/handlers/pdf/pdf.c
index a39819249..bc8a365f3 100644
--- a/content/handlers/pdf/pdf.c
+++ b/content/handlers/pdf/pdf.c
@@ -37,7 +37,9 @@
#include "netsurf/content.h"
#include "netsurf/browser_window.h"
#include "content/llcache.h"
+#include "content/content.h"
#include "content/content_protected.h"
+#include "content/content_factory.h"
#include "pdf.h"
@@ -243,6 +245,7 @@ pdf_change_page(struct pdf_content *pdfc,
float page_width;
float page_height;
nspdferror pdfres;
+ union content_msg_data msgdata;
/* ensure page stays in bounds */
if (page_number >= pdfc->page_count) {
@@ -265,10 +268,15 @@ pdf_change_page(struct pdf_content *pdfc,
page_height);
}
- browser_window_update(bw, false);
+ msgdata.redraw.x = 0;
+ msgdata.redraw.y = 0;
+ msgdata.redraw.width = pdfc->base.width;
+ msgdata.redraw.height = pdfc->base.height;
+
+ content_broadcast(&pdfc->base, CONTENT_MSG_REDRAW, &msgdata);
}
-static void
+static nserror
pdf_mouse_action(struct content *c,
struct browser_window *bw,
browser_mouse_state mouse,
@@ -287,6 +295,7 @@ pdf_mouse_action(struct content *c,
pdf_change_page(pdfc, bw, pdfc->current_page + 1);
}
}
+ return NSERROR_OK;
}
static const content_handler nspdf_content_handler = {