diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-11-13 16:34:24 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-11-13 21:27:07 +0100 |
commit | 4caf574c569d7c39e44b8ad66b16417ad8653b34 (patch) | |
tree | 03ece64d3fccc74b235bc4129305516eab69b534 /platform/x11/x11_main.c | |
parent | 5f0026cc97c7084be768a776f2fd8802bf9b0c21 (diff) | |
download | mupdf-4caf574c569d7c39e44b8ad66b16417ad8653b34.tar.xz |
Bug 696569: Get rid of drop shadow and use black background when inverted.
Diffstat (limited to 'platform/x11/x11_main.c')
-rw-r--r-- | platform/x11/x11_main.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/platform/x11/x11_main.c b/platform/x11/x11_main.c index 49156578..f25b8365 100644 --- a/platform/x11/x11_main.c +++ b/platform/x11/x11_main.c @@ -92,7 +92,6 @@ static int transition_dirty = 0; static int dirtysearch = 0; static char *password = ""; static XColor xbgcolor; -static XColor xshcolor; static int reqw = 0; static int reqh = 0; static char copylatin1[1024 * 16] = ""; @@ -226,12 +225,7 @@ static void winopen(void) xbgcolor.green = 0x7000; xbgcolor.blue = 0x7000; - xshcolor.red = 0x4000; - xshcolor.green = 0x4000; - xshcolor.blue = 0x4000; - XAllocColor(xdpy, DefaultColormap(xdpy, xscr), &xbgcolor); - XAllocColor(xdpy, DefaultColormap(xdpy, xscr), &xshcolor); xwin = XCreateWindow(xdpy, DefaultRootWindow(xdpy), 10, 10, 200, 100, 0, @@ -527,16 +521,15 @@ static void winblit(pdfapp_t *app) int x1 = gapp.panx + image_w; int y1 = gapp.pany + image_h; - XSetForeground(xdpy, xgc, xbgcolor.pixel); + if (app->invert) + XSetForeground(xdpy, xgc, BlackPixel(xdpy, DefaultScreen(xdpy))); + else + XSetForeground(xdpy, xgc, xbgcolor.pixel); fillrect(0, 0, x0, gapp.winh); fillrect(x1, 0, gapp.winw - x1, gapp.winh); fillrect(0, 0, gapp.winw, y0); fillrect(0, y1, gapp.winw, gapp.winh - y1); - XSetForeground(xdpy, xgc, xshcolor.pixel); - fillrect(x0+2, y1, image_w, 2); - fillrect(x1, y0+2, 2, image_h); - if (gapp.iscopying || justcopied) { pdfapp_invert(&gapp, gapp.selr); |