File imlib-1.9.8.1-image_from_drawable.patch of Package imlib

--- Imlib/utils.c
+++ Imlib/utils.c
@@ -2366,13 +2366,13 @@
       else
 	cmap = id->x.root_cmap;
 
-      for (i = 0; i < (1 << id->x.depth); i++)
+      for (i = 0; i < (1 << xatt.depth); i++)
 	{
 	  cols[i].pixel = i;
 	  cols[i].flags = DoRed | DoGreen | DoBlue;
 	}
-      XQueryColors(disp, cmap, cols, 1 << id->x.depth);
-      for (i = 0; i < (1 << id->x.depth); i++)
+      XQueryColors(disp, cmap, cols, 1 << xatt.depth);
+      for (i = 0; i < (1 << xatt.depth); i++)
 	{
 	  ctab[i].r = cols[i].red >> 8;
 	  ctab[i].g = cols[i].green >> 8;
openSUSE Build Service is sponsored by