Commit 70241904 authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

winex11: Always adjust the color_shifts pointer when SelectBitmap is called.

parent 1e6a8013
...@@ -110,10 +110,6 @@ HBITMAP CDECL X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap ) ...@@ -110,10 +110,6 @@ HBITMAP CDECL X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
if (physDev->depth != physBitmap->pixmap_depth) if (physDev->depth != physBitmap->pixmap_depth)
{ {
physDev->depth = physBitmap->pixmap_depth; physDev->depth = physBitmap->pixmap_depth;
if(physDev->depth == 1)
physDev->color_shifts = NULL;
else
physDev->color_shifts = &physBitmap->pixmap_color_shifts;
wine_tsx11_lock(); wine_tsx11_lock();
XFreeGC( gdi_display, physDev->gc ); XFreeGC( gdi_display, physDev->gc );
physDev->gc = XCreateGC( gdi_display, physDev->drawable, 0, NULL ); physDev->gc = XCreateGC( gdi_display, physDev->drawable, 0, NULL );
...@@ -122,6 +118,12 @@ HBITMAP CDECL X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap ) ...@@ -122,6 +118,12 @@ HBITMAP CDECL X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
XFlush( gdi_display ); XFlush( gdi_display );
wine_tsx11_unlock(); wine_tsx11_unlock();
} }
if(physDev->depth == 1)
physDev->color_shifts = NULL;
else
physDev->color_shifts = &physBitmap->pixmap_color_shifts;
return hbitmap; return hbitmap;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment