Ticket #18655: patch-goffice-0.6.6_goffice_cut-n-paste_foocanvas_foo-canvas-rect-ellipse.c.diff

File patch-goffice-0.6.6_goffice_cut-n-paste_foocanvas_foo-canvas-rect-ellipse.c.diff, 1.6 KB (added by LenoreHorner, 16 years ago)

Diff file that lets goffice install

  • goffice-0.6.6/goffice/cut-n-paste/foocanvas/

    old new  
    4242#include <string.h>
    4343
    4444#ifdef HAVE_RENDER
     45#ifdef HAVE_X
    4546#include <gdk/gdkx.h>
    4647#include <X11/extensions/Xrender.h>
    47 #endif
     48#endif /* HAVE_X */
     49#endif /* HAVE_RENDER */
    4850
    4951/* Base class for rectangle and ellipse item types */
    5052
     
    766768        int last_outline_update_width;
    767769
    768770#ifdef HAVE_RENDER
     771#ifdef HAVE_X
    769772        gboolean use_render;
    770773        XRenderPictFormat *format;
    771 #endif
     774#endif /* HAVE_X */
     775#endif /* HAVE_RENDER */
    772776};
    773777
    774778GType
     
    838842foo_canvas_rect_realize  (FooCanvasItem *item)
    839843{
    840844#ifdef HAVE_RENDER
     845#ifdef HAVE_X
    841846        FooCanvasRectPrivate *priv;
    842847        int event_base, error_base;
    843848        Display *dpy;
     
    856861
    857862                priv->format = XRenderFindVisualFormat (dpy, visual);
    858863        }
    859 #endif
     864#endif /* HAVE_X */
     865#endif /* HAVE_RENDER */
    860866
    861867        if (FOO_CANVAS_ITEM_CLASS (rect_parent_class)->realize) {
    862868                (* FOO_CANVAS_ITEM_CLASS (rect_parent_class)->realize) (item);
     
    889895        a = (rgba >> 0) & 0xff;
    890896
    891897#ifdef HAVE_RENDER
     898#ifdef HAVE_X
    892899        /* Every visual is not guaranteed to have a matching
    893900         * XRenderPictFormat. So make sure that format is not null before
    894901         * trying to render using Xrender calls.
     
    935942
    936943                return;
    937944        }
    938 #endif
     945#endif /* HAVE_X */
     946#endif /* HAVE_RENDER */
    939947        pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, width, height);
    940948        data = gdk_pixbuf_get_pixels (pixbuf);
    941949        rowstride = gdk_pixbuf_get_rowstride (pixbuf);