[PATCH 2/2] xfixes/input: use animated cursor hook to disable rendering of hidden cursors

Tiago Vignatti tiago.vignatti at nokia.com
Tue Aug 25 07:03:16 PDT 2009


Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 xfixes/cursor.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index acc703a..18b3146 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -59,6 +59,9 @@
 #include "inputstr.h"
 #include "windowstr.h"
 #include "xace.h"
+#ifdef RENDER
+#include <picturestr.h>
+#endif
 
 static RESTYPE		CursorClientType;
 static RESTYPE		CursorHideCountType;
@@ -924,6 +927,9 @@ ProcXFixesHideCursor (ClientPtr client)
 	}
     }
 
+#ifdef RENDER
+    AnimCursorStop(pWin->drawable.pScreen);
+#endif
     return ret;
 }
 
@@ -975,6 +981,9 @@ ProcXFixesShowCursor (ClientPtr client)
 	FreeResource(pChc->resource, 0);
     }
 
+#ifdef RENDER
+    AnimCursorStart(pWin->drawable.pScreen);
+#endif
     return (client->noClientException);
 }
 
@@ -1018,8 +1027,12 @@ CursorFreeHideCount (pointer data, XID id)
     deleteCursorHideCount(pChc, pChc->pScreen);
     for (dev = inputInfo.devices; dev; dev = dev->next)
     {
-        if (IsMaster(dev) && IsPointerDevice(dev))
+        if (IsMaster(dev) && IsPointerDevice(dev)) {
             CursorDisplayCursor(dev, pScreen, CursorCurrent[dev->id]);
+#ifdef RENDER
+            AnimCursorStart(pScreen);
+#endif
+        }
     }
 
     return 1;
-- 
1.5.6.3



More information about the xorg-devel mailing list