]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/XPM_Renderer.C
Fixed inset-text border redraw problem and hopefully recalc boostup.
[lyx.git] / src / graphics / XPM_Renderer.C
index 2d9e41b4900cef49777e6a4282a7368187cce5f5..131a52c981c47a757a2592057460d708903f870f 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <config.h>
 #include "XPM_Renderer.h"
+#include "frontends/support/LyXImage.h"
 
 #include FORMS_H_LOCATION
 #include XPM_H_LOCATION
@@ -44,7 +45,7 @@ bool XPM_Renderer::renderImage()
 
 //(BE 2000-08-05)
 #warning This might be a dirty thing, but I dont know any other solution.
-       Screen * screen = DefaultScreenOfDisplay(display);
+       Screen * screen = ScreenOfDisplay(display, fl_screen);
 
        int status = XpmReadFileToPixmap(
                        display, 
@@ -62,7 +63,7 @@ bool XPM_Renderer::renderImage()
        // This should have been set by the XpmReadFileToPixmap call!
        Assert(attrib.valuemask & XpmSize);
 
-       setPixmap(pixmap, attrib.width, attrib.height);
+       setPixmap(new LyXImage(pixmap), attrib.width, attrib.height);
 
        XpmFreeAttributes(&attrib);