summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-10-10 19:10:14 +0100
committerRobin Watts <robin.watts@artifex.com>2016-10-10 20:01:15 +0100
commit34b5ec0c2ae66511adb65d246287132f11abb3d4 (patch)
treea9e4efccdf2692cd81ca6b68f2074c21d94f603d
parent150e83b8d0095fb56310bf1e99900bbe88f6635e (diff)
downloadmupdf-34b5ec0c2ae66511adb65d246287132f11abb3d4.tar.xz
Bug 697094: Disable viewer text input on linux.
Only Windows and Android have form filling text input implemented properly so far. Neither of those build using the Makefile. We therefore disable text input in Makefile built viewers.
-rw-r--r--Makefile4
-rw-r--r--platform/x11/pdfapp.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index acf000ed..c6253230 100644
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,10 @@ CFLAGS += $(OPENSSL_CFLAGS)
CFLAGS += $(ZLIB_CFLAGS)
CFLAGS += $(LURATECH_CFLAGS)
+# Disable viewer text input until such time as it's implemented
+# on linux.
+CFLAGS += -DDISABLE_TEXT_INPUT
+
# --- Commands ---
ifneq "$(verbose)" "yes"
diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c
index 0b81d37f..98cd510c 100644
--- a/platform/x11/pdfapp.c
+++ b/platform/x11/pdfapp.c
@@ -1641,6 +1641,7 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta
{
switch (pdf_widget_type(ctx, widget))
{
+#ifdef DISABLE_TEXT_INPUT
case PDF_WIDGET_TYPE_TEXT:
{
char *text = pdf_text_widget_text(ctx, idoc, widget);
@@ -1658,7 +1659,7 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta
pdfapp_updatepage(app);
}
break;
-
+#endif
case PDF_WIDGET_TYPE_LISTBOX:
case PDF_WIDGET_TYPE_COMBOBOX:
{