aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/mi
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-05-26 08:58:03 +0000
committermarha <marha@users.sourceforge.net>2010-05-26 08:58:03 +0000
commite60ed91097aa7511581b6c53b9e4b14aaf1027b5 (patch)
treec8ce06db36103141858e95febad857ca989e7ad0 /xorg-server/mi
parentfb91c8589937f1a9aba5d5a4e0de98c381dfe9b8 (diff)
parentfade1b113f18f3fd26c3c01ca4543effa80b9b62 (diff)
downloadvcxsrv-e60ed91097aa7511581b6c53b9e4b14aaf1027b5.tar.gz
vcxsrv-e60ed91097aa7511581b6c53b9e4b14aaf1027b5.tar.bz2
vcxsrv-e60ed91097aa7511581b6c53b9e4b14aaf1027b5.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/mi')
-rw-r--r--xorg-server/mi/midispcur.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/xorg-server/mi/midispcur.c b/xorg-server/mi/midispcur.c
index 8b26765a8..d56080488 100644
--- a/xorg-server/mi/midispcur.c
+++ b/xorg-server/mi/midispcur.c
@@ -141,6 +141,7 @@ miDCRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
}
#ifdef ARGB_CURSOR
+#define EnsurePicture(picture,draw,win) (picture || miDCMakePicture(&picture,draw,win))
static VisualPtr
miDCGetWindowVisual (WindowPtr pWin)
@@ -413,6 +414,8 @@ miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
#ifdef ARGB_CURSOR
if (pPriv->pPicture)
{
+ if (!EnsurePicture(pBuffer->pRootPicture, &pWin->drawable, pWin))
+ return FALSE;
CompositePicture (PictOpOver,
pPriv->pPicture,
NULL,
@@ -695,9 +698,8 @@ miDCMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor,
#ifdef ARGB_CURSOR
if (pPriv->pPicture)
{
- if (!pBuffer->pTempPicture)
- miDCMakePicture(&pBuffer->pTempPicture, &pTemp->drawable, pWin);
-
+ if (!EnsurePicture(pBuffer->pTempPicture, &pTemp->drawable, pWin))
+ return FALSE;
CompositePicture (PictOpOver,
pPriv->pPicture,
NULL,
@@ -781,10 +783,7 @@ miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
goto failure;
#ifdef ARGB_CURSOR
- miDCMakePicture(&pBuffer->pRootPicture, &pWin->drawable, pWin);
- if (!pBuffer->pRootPicture)
- goto failure;
-
+ pBuffer->pRootPicture = NULL;
pBuffer->pTempPicture = NULL;
#endif