mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
winex11: Always adjust the color_shifts pointer when SelectBitmap is called.
This commit is contained in:
parent
1e6a80133b
commit
70241904b9
1 changed files with 6 additions and 4 deletions
|
@ -110,10 +110,6 @@ HBITMAP CDECL X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
|
|||
if (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();
|
||||
XFreeGC( gdi_display, physDev->gc );
|
||||
physDev->gc = XCreateGC( gdi_display, physDev->drawable, 0, NULL );
|
||||
|
@ -122,6 +118,12 @@ HBITMAP CDECL X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
|
|||
XFlush( gdi_display );
|
||||
wine_tsx11_unlock();
|
||||
}
|
||||
|
||||
if(physDev->depth == 1)
|
||||
physDev->color_shifts = NULL;
|
||||
else
|
||||
physDev->color_shifts = &physBitmap->pixmap_color_shifts;
|
||||
|
||||
return hbitmap;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue