wined3d: Move PARAM C[] program.env[] into baseshader and out of vertex shaders.
[wine] / dlls / x11drv / init.c
index 9524c9b..83eac53 100644 (file)
@@ -164,8 +164,6 @@ BOOL X11DRV_DeleteDC( X11DRV_PDEVICE *physDev )
     DeleteObject( physDev->region );
     wine_tsx11_lock();
     XFreeGC( gdi_display, physDev->gc );
-    while (physDev->used_visuals-- > 0)
-        XFree(physDev->visuals[physDev->used_visuals]);
     wine_tsx11_unlock();
     HeapFree( GetProcessHeap(), 0, physDev );
     return TRUE;
@@ -414,16 +412,27 @@ INT X11DRV_ExtEscape( X11DRV_PDEVICE *physDev, INT escape, INT in_count, LPCVOID
                 {
                     if(physDev->bitmap)
                     {
-                        if(!physDev->bitmap->glxpixmap)
-                            physDev->bitmap->glxpixmap = create_glxpixmap(physDev);
-
-                        *(Drawable *)out_data = physDev->bitmap->glxpixmap;
+                        if (physDev->bitmap->hbitmap == BITMAP_stock_phys_bitmap.hbitmap)
+                            *(Drawable *)out_data = physDev->drawable; /* PBuffer */
+                        else {
+                            if(!physDev->bitmap->glxpixmap)
+                                physDev->bitmap->glxpixmap = create_glxpixmap(physDev);
+                            *(Drawable *)out_data = physDev->bitmap->glxpixmap;
+                        }
                     }
                     else
                         *(Drawable *)out_data = physDev->drawable;
                     return TRUE;
                 }
                 break;
+            case X11DRV_SYNC_PIXMAP:
+                if(physDev->bitmap)
+                {
+                    X11DRV_CoerceDIBSection(physDev, DIB_Status_GdiMod, FALSE);
+                    return TRUE;
+                }
+                return FALSE;
+                break;
             }
         }
         break;