rnd-20030118-6-src
[rocksndiamonds.git] / src / libgame / x11.c
index 4ef1bd16f258cbb3c6eb3cb206cdf98bdd870410..6c2942d1f00b5128fdd447aa33a470cf2d2e6577 100644 (file)
@@ -254,6 +254,8 @@ Bitmap *X11LoadImage(char *filename)
   Bitmap *new_bitmap = CreateBitmapStruct();
   char *error = "Read_PCX_to_Pixmap(): %s '%s'";
   int pcx_err;
+  XGCValues clip_gc_values;
+  unsigned long clip_gc_valuemask;
 
   pcx_err = Read_PCX_to_Pixmap(display, window->drawable, window->gc, filename,
                               &new_bitmap->drawable, &new_bitmap->clip_mask);
@@ -296,6 +298,12 @@ Bitmap *X11LoadImage(char *filename)
     return NULL;
   }
 
+  clip_gc_values.graphics_exposures = False;
+  clip_gc_values.clip_mask = new_bitmap->clip_mask;
+  clip_gc_valuemask = GCGraphicsExposures | GCClipMask;
+  new_bitmap->stored_clip_gc = XCreateGC(display, window->drawable,
+                                        clip_gc_valuemask, &clip_gc_values);
+
   /* set GraphicContext inheritated from Window */
   new_bitmap->gc = window->gc;