xserver: Branch 'master'

Jon TURNEY jturney at kemper.freedesktop.org
Wed Dec 17 08:16:18 PST 2008


 hw/xwin/winmultiwindowicons.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit bf65523ab0b39774f07a7ae478ff3f5653fad469
Author: Joe Krahn <jkrahn at nc.rr.com>
Date:   Sun Nov 2 20:17:03 2008 +0000

    Cygwin/X: Fix for mis-aligned icon data creates bad background masks (#4491)
    
    fd.o bugzilla #4491
    
    Transparent icon backgrounds appear with black stripes as mask data is incorrectly aligned.
    Modified the icon DDB bitmap data alignment to 16 bits
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>

diff --git a/hw/xwin/winmultiwindowicons.c b/hw/xwin/winmultiwindowicons.c
index fbc516c..9645718 100644
--- a/hw/xwin/winmultiwindowicons.c
+++ b/hw/xwin/winmultiwindowicons.c
@@ -83,8 +83,8 @@ winScaleXBitmapToWindows (int iconSize,
   if (pixmap->drawable.depth == 15)
     effXDepth = 16;
 
-  /* Need 32-bit aligned rows */
-  stride = ((iconSize * effBPP + 31) & (~31)) / 8;
+  /* Need 16-bit aligned rows for DDBitmaps */
+  stride = ((iconSize * effBPP + 15) & (~15)) / 8;
   xStride = PixmapBytePad (pixmap->drawable.width, pixmap->drawable.depth);
   if (stride == 0 || xStride == 0)
     {
@@ -296,11 +296,11 @@ winXIconToHICON (WindowPtr pWin, int iconSize)
   else
     effBPP = bpp;
   
-  /* Need 32-bit aligned rows */
-  stride = ((iconSize * effBPP + 31) & (~31)) / 8;
+  /* Need 16-bit aligned rows for DDBitmaps */
+  stride = ((iconSize * effBPP + 15) & (~15)) / 8;
 
   /* Mask is 1-bit deep */
-  maskStride = ((iconSize * 1 + 31) & (~31)) / 8; 
+  maskStride = ((iconSize * 1 + 15) & (~15)) / 8;
 
   image = malloc (stride * iconSize);
   imageMask = malloc (stride * iconSize);


More information about the xorg-commit mailing list