X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=pdf%2Fxpdf%2FXPDFApp.cc;h=ae8d0099e241114509e556bd66e19efcdc881e09;hb=5932479cc8c371a385616b5909df558a091b7111;hp=5125f5f1350295b3bcd155d56b27d27569911a1f;hpb=d57c02ebc09bfd1a0cac44140ec7a80dbe43877e;p=evince.git diff --git a/pdf/xpdf/XPDFApp.cc b/pdf/xpdf/XPDFApp.cc index 5125f5f1..ae8d0099 100644 --- a/pdf/xpdf/XPDFApp.cc +++ b/pdf/xpdf/XPDFApp.cc @@ -17,7 +17,7 @@ #include "Error.h" #include "XPDFViewer.h" #include "XPDFApp.h" -#include "config.h" +#include "xpdfconfig.h" // these macro defns conflict with xpdf's Object class #ifdef LESSTIF_VERSION @@ -163,12 +163,20 @@ void XPDFApp::getResources() { installCmap = (GBool)resources.installCmap; rgbCubeSize = resources.rgbCubeSize; reverseVideo = (GBool)resources.reverseVideo; - paperColor = reverseVideo ? BlackPixel(display, screenNum) : - WhitePixel(display, screenNum); + if (reverseVideo) { + paperRGB = splashMakeRGB8(0x00, 0x00, 0x00); + paperColor = BlackPixel(display, screenNum); + } else { + paperRGB = splashMakeRGB8(0xff, 0xff, 0xff); + paperColor = WhitePixel(display, screenNum); + } if (resources.paperColor) { XtVaGetValues(appShell, XmNcolormap, &colormap, NULL); if (XAllocNamedColor(display, colormap, resources.paperColor, &xcol, &xcol2)) { + paperRGB = splashMakeRGB8(xcol.red >> 8, + xcol.green >> 8, + xcol.blue >> 8); paperColor = xcol.pixel; } else { error(-1, "Couldn't allocate color '%s'", resources.paperColor);