From 889d7dd8e94a5538f388cc619115bf5c0b6fc0b7 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 10 Sep 2013 09:01:25 +0200 Subject: fontconfig libX11 libXmu libxcb mesa xserver git update 10 Sep 2013 xserver commit 47ff382d1fce25a8b097d45b79489e891f1f1228 libxcb commit f1405d9fe4a6ddcae24585ba254389a4c4f4c8c9 libX11 commit cb107760df33ffc8630677e66e2e50aa37950a5c libXmu commit 2539e539eafdac88177c8ee30b043c5d52f017e4 fontconfig commit a61e145304da86c8c35b137493bbd8fd5dd1e7f5 mesa commit 395b9410860371a64d6b5f2d50679f29eb41729e --- xorg-server/hw/xwin/wincursor.c | 43 ++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'xorg-server/hw/xwin/wincursor.c') diff --git a/xorg-server/hw/xwin/wincursor.c b/xorg-server/hw/xwin/wincursor.c index 2962d06ad..a35336a34 100644 --- a/xorg-server/hw/xwin/wincursor.c +++ b/xorg-server/hw/xwin/wincursor.c @@ -162,7 +162,7 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen) HDC hDC; BITMAPV4HEADER bi; BITMAPINFO *pbmi; - unsigned long *lpBits; + uint32_t *lpBits; WIN_DEBUG_MSG("winLoadCursor: Win32: %dx%d X11: %dx%d hotspot: %d,%d\n", pScreenPriv->cursor.sm_cx, pScreenPriv->cursor.sm_cy, @@ -256,15 +256,14 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen) bi.bV4AlphaMask = 0xFF000000; lpBits = - (unsigned long *) calloc(pScreenPriv->cursor.sm_cx * - pScreenPriv->cursor.sm_cy, - sizeof(unsigned long)); + (uint32_t *) calloc(pScreenPriv->cursor.sm_cx * + pScreenPriv->cursor.sm_cy, + sizeof(uint32_t)); if (lpBits) { int y; for (y = 0; y < nCY; y++) { - unsigned long *src, *dst; - + void *src, *dst; src = &(pCursor->bits->argb[y * pCursor->bits->width]); dst = &(lpBits[y * pScreenPriv->cursor.sm_cx]); memcpy(dst, src, 4 * nCX); @@ -273,9 +272,12 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen) } /* End if-truecolor-icon */ if (!lpBits) { + RGBQUAD *pbmiColors; /* Bicolor, use a palettized DIB */ WIN_DEBUG_MSG("winLoadCursor: Trying two color cursor\n"); pbmi = (BITMAPINFO *) &bi; + pbmiColors = &(pbmi->bmiColors[0]); + memset(pbmi, 0, sizeof(BITMAPINFOHEADER)); pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); pbmi->bmiHeader.biWidth = pScreenPriv->cursor.sm_cx; @@ -286,22 +288,23 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen) pbmi->bmiHeader.biSizeImage = 0; pbmi->bmiHeader.biClrUsed = 3; pbmi->bmiHeader.biClrImportant = 3; - pbmi->bmiColors[0].rgbRed = 0; /* Empty */ - pbmi->bmiColors[0].rgbGreen = 0; - pbmi->bmiColors[0].rgbBlue = 0; - pbmi->bmiColors[0].rgbReserved = 0; - pbmi->bmiColors[1].rgbRed = pCursor->backRed >> 8; /* Background */ - pbmi->bmiColors[1].rgbGreen = pCursor->backGreen >> 8; - pbmi->bmiColors[1].rgbBlue = pCursor->backBlue >> 8; - pbmi->bmiColors[1].rgbReserved = 0; - pbmi->bmiColors[2].rgbRed = pCursor->foreRed >> 8; /* Foreground */ - pbmi->bmiColors[2].rgbGreen = pCursor->foreGreen >> 8; - pbmi->bmiColors[2].rgbBlue = pCursor->foreBlue >> 8; - pbmi->bmiColors[2].rgbReserved = 0; + + pbmiColors[0].rgbRed = 0; /* Empty */ + pbmiColors[0].rgbGreen = 0; + pbmiColors[0].rgbBlue = 0; + pbmiColors[0].rgbReserved = 0; + pbmiColors[1].rgbRed = pCursor->backRed >> 8; /* Background */ + pbmiColors[1].rgbGreen = pCursor->backGreen >> 8; + pbmiColors[1].rgbBlue = pCursor->backBlue >> 8; + pbmiColors[1].rgbReserved = 0; + pbmiColors[2].rgbRed = pCursor->foreRed >> 8; /* Foreground */ + pbmiColors[2].rgbGreen = pCursor->foreGreen >> 8; + pbmiColors[2].rgbBlue = pCursor->foreBlue >> 8; + pbmiColors[2].rgbReserved = 0; lpBits = - (unsigned long *) calloc(pScreenPriv->cursor.sm_cx * - pScreenPriv->cursor.sm_cy, sizeof(char)); + (uint32_t *) calloc(pScreenPriv->cursor.sm_cx * + pScreenPriv->cursor.sm_cy, sizeof(char)); pCur = (unsigned char *) lpBits; if (lpBits) { -- cgit v1.2.3