[PATCH] mi: removed the invisible cursor and never realize this cursor.

Jamey Sharp jamey at minilop.net
Fri May 21 08:57:06 PDT 2010


On Thu, May 20, 2010 at 11:44 PM, Oliver McFadden
<oliver.mcfadden at nokia.com> wrote:
> -    if (cs->pCursorHideCounts != NULL || !CursorVisible) {
> -        ret = ((*pScreen->RealizeCursor)(pDev, pScreen, pInvisibleCursor) &&
> -              (*pScreen->DisplayCursor) (pDev, pScreen, pInvisibleCursor));
> -    } else {
> -       ret = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor);
> +    if (!cs->pCursorHideCounts && CursorVisible) {
> +        ret = ((*pScreen->RealizeCursor)(pDev, pScreen, pCursor) &&
> +              (*pScreen->DisplayCursor) (pDev, pScreen, pCursor));
>     }

I don't understand the intent here. I think you still want to call
DisplayCursor with NullCursor, just not RealizeCursor; and I guess
this patch introduces an extra call to RealizeCursor for the
visible-cursor case.

I thought you'd want this patch hunk instead:

diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index 52bdb27..1f5f841 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -148,8 +148,7 @@ CursorDisplayCursor (DeviceIntPtr pDev,
        CursorVisible = EnableCursor;

     if (cs->pCursorHideCounts != NULL || !CursorVisible) {
-        ret = ((*pScreen->RealizeCursor)(pDev, pScreen, pInvisibleCursor) &&
-              (*pScreen->DisplayCursor) (pDev, pScreen, pInvisibleCursor));
+        ret = (*pScreen->DisplayCursor) (pDev, pScreen, NullCursor);
     } else {
        ret = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor);
     }

I haven't compiled that though, let alone tested it.

Jamey


More information about the xorg-devel mailing list