Index: graphics/x11drv/dib.c
===================================================================
RCS file: /cvsroot/rewind/rewind/graphics/x11drv/dib.c,v
retrieving revision 1.88
diff -u -r1.88 dib.c
--- graphics/x11drv/dib.c	6 May 2002 19:46:47 -0000	1.88
+++ graphics/x11drv/dib.c	10 May 2002 16:16:06 -0000
@@ -4877,7 +4877,9 @@
   descr.height    = lines;
   descr.useShm    = FALSE;
   descr.dibpitch  = ((descr.infoWidth * descr.infoBpp + 31) &~31) / 8;
+  X11DRV_DIB_Lock(bmp, DIB_Status_GdiMod, FALSE);
   result = X11DRV_DIB_SetImageBits( &descr );
+  X11DRV_DIB_Unlock(bmp, TRUE);
 
   if (descr.colorMap) HeapFree(GetProcessHeap(), 0, descr.colorMap);
 
@@ -4988,7 +4990,9 @@
   descr.dibpitch = dib ? (dib->dibSection.dsBm.bmWidthBytes)
 		       : (((descr.infoWidth * descr.infoBpp + 31) &~31) / 8);
 
+  X11DRV_DIB_Lock(bmp, DIB_Status_GdiMod, FALSE);
   X11DRV_DIB_GetImageBits( &descr );
+  X11DRV_DIB_Unlock(bmp, TRUE);
 
   if(info->bmiHeader.biSizeImage == 0) /* Fill in biSizeImage */
       info->bmiHeader.biSizeImage = DIB_GetDIBImageBytes(
@@ -5634,7 +5638,7 @@
   INT effHeight, totalSize;
   BITMAP bm;
   LPVOID mapBits = NULL;
-  
+
   TRACE("format (%ld,%ld), planes %d, bpp %d, size %ld, colors %ld (%s)\n",
 	bi->biWidth, bi->biHeight, bi->biPlanes, bi->biBitCount,
 	bi->biSizeImage, bi->biClrUsed, usage == DIB_PAL_COLORS? "PAL" : "RGB");
