aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/ramdac/xf86Cursor.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-03-22 10:29:25 +0000
committermarha <marha@users.sourceforge.net>2010-03-22 10:29:25 +0000
commitac80633ce275edddaa3e4fa2ae0c048ed00f7d74 (patch)
tree7d4ceffed59f2782533d3485c075f605ab1b9c61 /xorg-server/hw/xfree86/ramdac/xf86Cursor.c
parent6fc6cb8c935fab174e4582909c1cb4f12bd598bf (diff)
downloadvcxsrv-ac80633ce275edddaa3e4fa2ae0c048ed00f7d74.tar.gz
vcxsrv-ac80633ce275edddaa3e4fa2ae0c048ed00f7d74.tar.bz2
vcxsrv-ac80633ce275edddaa3e4fa2ae0c048ed00f7d74.zip
svn merge -c505 ^/branches/released .
Diffstat (limited to 'xorg-server/hw/xfree86/ramdac/xf86Cursor.c')
-rw-r--r--xorg-server/hw/xfree86/ramdac/xf86Cursor.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c
index 6b71f4677..7f23d9ef3 100644
--- a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c
+++ b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c
@@ -129,6 +129,9 @@ xf86CursorCloseScreen(int i, ScreenPtr pScreen)
if (ScreenPriv->isUp && pScrn->vtSema)
xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y);
+ if (ScreenPriv->CurrentCursor)
+ FreeCursor(ScreenPriv->CurrentCursor, None);
+
pScreen->CloseScreen = ScreenPriv->CloseScreen;
pScreen->QueryBestSize = ScreenPriv->QueryBestSize;
pScreen->RecolorCursor = ScreenPriv->RecolorCursor;
@@ -317,6 +320,9 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
if (pDev == inputInfo.pointer ||
(!IsMaster(pDev) && pDev->u.master == inputInfo.pointer))
{
+ pCurs->refcnt++;
+ if (ScreenPriv->CurrentCursor)
+ FreeCursor(ScreenPriv->CurrentCursor, None);
ScreenPriv->CurrentCursor = pCurs;
ScreenPriv->x = x;
ScreenPriv->y = y;