From 79f8fcc40e132b0355af833ecc0b0488d7a1e382 Mon Sep 17 00:00:00 2001 From: D1mon Date: Wed, 14 Feb 2024 11:51:08 +0300 Subject: [PATCH] add fullscreen argument --- platform/x11/pdfapp.c | 1 + platform/x11/x11_main.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c index 6775f2107d..b0fd858e96 100644 --- a/platform/x11/pdfapp.c +++ b/platform/x11/pdfapp.c @@ -1150,6 +1150,7 @@ static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repai winresize(app, w, h); } + winfullscreen(app, app->fullscreen); winrepaint(app); wincursor(app, ARROW); diff --git a/platform/x11/x11_main.c b/platform/x11/x11_main.c index 84ae0a4ab9..dae697eb3f 100644 --- a/platform/x11/x11_main.c +++ b/platform/x11/x11_main.c @@ -868,6 +868,7 @@ static void usage(const char *argv0) fprintf(stderr, "usage: %s [options] file.pdf [page]\n", argv0); fprintf(stderr, "\t-p -\tpassword\n"); fprintf(stderr, "\t-r -\tresolution\n"); + fprintf(stderr, "\t-F -\tfullscreen\n"); fprintf(stderr, "\t-A -\tset anti-aliasing quality in bits (0=off, 8=best)\n"); fprintf(stderr, "\t-C -\tRRGGBB (tint color in hexadecimal syntax)\n"); fprintf(stderr, "\t-W -\tpage width for EPUB layout\n"); @@ -907,7 +908,7 @@ int main(int argc, char **argv) pdfapp_init(ctx, &gapp); - while ((c = fz_getopt(argc, argv, "Ip:r:A:C:W:H:S:U:Xb:")) != -1) + while ((c = fz_getopt(argc, argv, "IFp:r:A:C:W:H:S:U:Xb:")) != -1) { switch (c) { @@ -919,6 +920,7 @@ int main(int argc, char **argv) case 'p': password = fz_optarg; break; case 'r': resolution = atoi(fz_optarg); break; case 'I': gapp.invert = 1; break; + case 'F': gapp.fullscreen = 1; break; case 'A': fz_set_aa_level(ctx, atoi(fz_optarg)); break; case 'W': gapp.layout_w = fz_atof(fz_optarg); break; case 'H': gapp.layout_h = fz_atof(fz_optarg); break;