summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-11-15 16:38:12 +0100
committerTor Andersson <tor.andersson@artifex.com>2016-11-16 12:24:29 +0100
commitce90119c0102092e1d743b4a1ec88c40570ff7ac (patch)
treec8bfcc3bf5f2e897261df2b540a54cb8e7f0e857
parentadaa08a921d32f3c1600c5c855e7da9ffb8a994a (diff)
downloadmupdf-ce90119c0102092e1d743b4a1ec88c40570ff7ac.tar.xz
Fix 697334: disable text input in x11 viewer permanently.
The hacky stdin workaround has never worked satisfactorily. Just nuke it.
-rw-r--r--Makefile4
-rw-r--r--platform/x11/pdfapp.c2
-rw-r--r--platform/x11/x11_main.c10
3 files changed, 2 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 838d5565..920f3c6c 100644
--- a/Makefile
+++ b/Makefile
@@ -40,10 +40,6 @@ 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 ce059651..0b0abafc 100644
--- a/platform/x11/pdfapp.c
+++ b/platform/x11/pdfapp.c
@@ -1639,7 +1639,6 @@ 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);
@@ -1657,7 +1656,6 @@ 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:
{
diff --git a/platform/x11/x11_main.c b/platform/x11/x11_main.c
index c061dc8b..ecd4d809 100644
--- a/platform/x11/x11_main.c
+++ b/platform/x11/x11_main.c
@@ -176,14 +176,8 @@ char *winpassword(pdfapp_t *app, char *filename)
char *wintextinput(pdfapp_t *app, char *inittext, int retry)
{
- static char buf[256];
-
- if (retry)
- return NULL;
-
- printf("> [%s] ", inittext);
- fgets(buf, sizeof buf, stdin);
- return buf;
+ /* We don't support text input on the x11 viewer */
+ return NULL;
}
int winchoiceinput(pdfapp_t *app, int nopts, char *opts[], int *nvals, char *vals[])