aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/wincursor.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-09-10 10:38:33 +0200
committermarha <marha@users.sourceforge.net>2013-09-10 10:42:30 +0200
commit2c1b75db27d66ff4760d624e44d1c1c6f42a4ca7 (patch)
treea32e3d5f8bb662ba5c14a72d97a553c4927c0b76 /xorg-server/hw/xwin/wincursor.c
parentd53900c52abc2402f978b72278712e4bcdbde9f2 (diff)
parent889d7dd8e94a5538f388cc619115bf5c0b6fc0b7 (diff)
downloadvcxsrv-2c1b75db27d66ff4760d624e44d1c1c6f42a4ca7.tar.gz
vcxsrv-2c1b75db27d66ff4760d624e44d1c1c6f42a4ca7.tar.bz2
vcxsrv-2c1b75db27d66ff4760d624e44d1c1c6f42a4ca7.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig libX11 libXmu libxcb mesa xserver git update 10 Sep 2013 Conflicts: mesalib/src/glsl/.gitignore xorg-server/hw/xwin/InitOutput.c xorg-server/hw/xwin/winclipboardwndproc.c xorg-server/hw/xwin/winmultiwindowwm.c xorg-server/hw/xwin/winsetsp.c
Diffstat (limited to 'xorg-server/hw/xwin/wincursor.c')
-rw-r--r--xorg-server/hw/xwin/wincursor.c43
1 files changed, 23 insertions, 20 deletions
diff --git a/xorg-server/hw/xwin/wincursor.c b/xorg-server/hw/xwin/wincursor.c
index 8e8c6fd3d..d55ff5bde 100644
--- a/xorg-server/hw/xwin/wincursor.c
+++ b/xorg-server/hw/xwin/wincursor.c
@@ -161,7 +161,7 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen)
HDC hDC;
BITMAPV4HEADER bi;
BITMAPINFO *pbmi;
- unsigned long *lpBits;
+ uint32_t *lpBits;
winDebug("winLoadCursor: Win32: %dx%d X11: %dx%d hotspot: %d,%d\n",
pScreenPriv->cursor.sm_cx, pScreenPriv->cursor.sm_cy,
@@ -255,15 +255,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);
@@ -272,9 +271,12 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen)
} /* End if-truecolor-icon */
if (!lpBits) {
+ RGBQUAD *pbmiColors;
/* Bicolor, use a palettized DIB */
winDebug("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;
@@ -285,22 +287,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) {