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

Alexandre Julliard julliard at winehq.org
Tue Sep 8 08:53:56 CDT 2009


Module: wine
Branch: master
Commit: 70241904b9efacab9fb6c7d8701b1cfdb86f49f7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=70241904b9efacab9fb6c7d8701b1cfdb86f49f7

Author: Roderick Colenbrander <thunderbird2k at gmail.com>
Date:   Thu Sep  3 13:51:44 2009 +0200

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

---

 dlls/winex11.drv/bitmap.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dlls/winex11.drv/bitmap.c b/dlls/winex11.drv/bitmap.c
index 4d635aa..fee2dbc 100644
--- a/dlls/winex11.drv/bitmap.c
+++ b/dlls/winex11.drv/bitmap.c
@@ -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;
 }
 




More information about the wine-cvs mailing list