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) |
---|
-
goffice-0.6.6/goffice/cut-n-paste/foocanvas/
old new 42 42 #include <string.h> 43 43 44 44 #ifdef HAVE_RENDER 45 #ifdef HAVE_X 45 46 #include <gdk/gdkx.h> 46 47 #include <X11/extensions/Xrender.h> 47 #endif 48 #endif /* HAVE_X */ 49 #endif /* HAVE_RENDER */ 48 50 49 51 /* Base class for rectangle and ellipse item types */ 50 52 … … 766 768 int last_outline_update_width; 767 769 768 770 #ifdef HAVE_RENDER 771 #ifdef HAVE_X 769 772 gboolean use_render; 770 773 XRenderPictFormat *format; 771 #endif 774 #endif /* HAVE_X */ 775 #endif /* HAVE_RENDER */ 772 776 }; 773 777 774 778 GType … … 838 842 foo_canvas_rect_realize (FooCanvasItem *item) 839 843 { 840 844 #ifdef HAVE_RENDER 845 #ifdef HAVE_X 841 846 FooCanvasRectPrivate *priv; 842 847 int event_base, error_base; 843 848 Display *dpy; … … 856 861 857 862 priv->format = XRenderFindVisualFormat (dpy, visual); 858 863 } 859 #endif 864 #endif /* HAVE_X */ 865 #endif /* HAVE_RENDER */ 860 866 861 867 if (FOO_CANVAS_ITEM_CLASS (rect_parent_class)->realize) { 862 868 (* FOO_CANVAS_ITEM_CLASS (rect_parent_class)->realize) (item); … … 889 895 a = (rgba >> 0) & 0xff; 890 896 891 897 #ifdef HAVE_RENDER 898 #ifdef HAVE_X 892 899 /* Every visual is not guaranteed to have a matching 893 900 * XRenderPictFormat. So make sure that format is not null before 894 901 * trying to render using Xrender calls. … … 935 942 936 943 return; 937 944 } 938 #endif 945 #endif /* HAVE_X */ 946 #endif /* HAVE_RENDER */ 939 947 pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, width, height); 940 948 data = gdk_pixbuf_get_pixels (pixbuf); 941 949 rowstride = gdk_pixbuf_get_rowstride (pixbuf);