From ce90119c0102092e1d743b4a1ec88c40570ff7ac Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 15 Nov 2016 16:38:12 +0100 Subject: Fix 697334: disable text input in x11 viewer permanently. The hacky stdin workaround has never worked satisfactorily. Just nuke it. --- platform/x11/pdfapp.c | 2 -- platform/x11/x11_main.c | 10 ++-------- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'platform/x11') 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[]) -- cgit v1.2.3