Lars-Ake Fredlund : winex11: Don' t create a mapping if X11DRV_PALETTE_VIRTUAL is set.

Alexandre Julliard julliard at winehq.org
Thu Feb 7 07:59:30 CST 2008


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

Author: Lars-Ake Fredlund <fred at babel.ls.fi.upm.es>
Date:   Wed Jan 30 13:23:28 2008 +0100

winex11: Don't create a mapping if X11DRV_PALETTE_VIRTUAL is set.

---

 dlls/winex11.drv/palette.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/winex11.drv/palette.c b/dlls/winex11.drv/palette.c
index a2a4046..1b74e2c 100644
--- a/dlls/winex11.drv/palette.c
+++ b/dlls/winex11.drv/palette.c
@@ -251,15 +251,15 @@ int X11DRV_PALETTE_Init(void)
 
     GetPaletteEntries( GetStockObject(DEFAULT_PALETTE), 0, NB_RESERVED_COLORS, sys_pal_template );
 
-    if ((mapping = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(int) * NB_RESERVED_COLORS )))
-        palette_set_mapping( GetStockObject(DEFAULT_PALETTE), mapping );
-
     if( X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_VIRTUAL )
     {
         palette_size = 0;
     }
     else
     {
+        if ((mapping = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(int) * NB_RESERVED_COLORS )))
+            palette_set_mapping( GetStockObject(DEFAULT_PALETTE), mapping );
+
         if (X11DRV_PALETTE_PaletteFlags & X11DRV_PALETTE_PRIVATE)
             X11DRV_PALETTE_BuildPrivateMap( sys_pal_template );
         else




More information about the wine-cvs mailing list