diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java index 0bb0f4d85e..0a57b144e1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java @@ -102,7 +102,11 @@ public static int /*long*/ createPixbuf(Image image) { Cairo.cairo_surface_destroy(surface); } else { int [] w = new int [1], h = new int [1]; - OS.gdk_drawable_get_size (image.pixmap, w, h); + if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) { + OS.gdk_pixmap_get_size(image.pixmap, w, h); + } else { + OS.gdk_drawable_get_size (image.pixmap, w, h); + } int /*long*/ colormap = OS.gdk_colormap_get_system (); boolean hasMask = image.mask != 0 && OS.gdk_drawable_get_depth (image.mask) == 1; if (hasMask) { |