diff options
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/x11/gdkdrawable-x11.c | 17 | ||||
-rw-r--r-- | gdk/x11/gdkgc-x11.c | 3 |
2 files changed, 14 insertions, 6 deletions
diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c index ad4c97096b..89c7661ff4 100644 --- a/gdk/x11/gdkdrawable-x11.c +++ b/gdk/x11/gdkdrawable-x11.c @@ -1,4 +1,4 @@ -/* GDK - The GIMP Drawing Kit +/* GIMP Drawing Kit * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or @@ -238,6 +238,9 @@ gdk_x11_drawable_get_picture (GdkDrawable *drawable) { GdkDrawableImplX11 *impl = GDK_DRAWABLE_IMPL_X11 (drawable); + if (!_gdk_x11_have_render ()) + return None; + if (impl->picture == None) { GdkVisual *visual = gdk_drawable_get_visual (drawable); @@ -802,12 +805,14 @@ select_format (Display *xdisplay, XRenderPictFormat **mask) { XRenderPictFormat pf; - -/* Look for a 32-bit xRGB and Axxx formats that exactly match the - * in memory data format. We can use them as pixmap and mask - * to deal with non-premultiplied data. - */ + if (!_gdk_x11_have_render ()) + return FORMAT_NONE; + + /* Look for a 32-bit xRGB and Axxx formats that exactly match the + * in memory data format. We can use them as pixmap and mask + * to deal with non-premultiplied data. + */ pf.type = PictTypeDirect; pf.depth = 32; diff --git a/gdk/x11/gdkgc-x11.c b/gdk/x11/gdkgc-x11.c index b703b7e3b9..3605718e13 100644 --- a/gdk/x11/gdkgc-x11.c +++ b/gdk/x11/gdkgc-x11.c @@ -804,6 +804,9 @@ _gdk_x11_gc_get_fg_picture (GdkGC *gc) g_return_val_if_fail (GDK_IS_GC_X11 (gc), None); + if (!_gdk_x11_have_render ()) + return None; + x11_gc = GDK_GC_X11 (gc); if (x11_gc->fg_picture == None) |