[PATCH v2] mi: remove log-spamming bogus error message (#26843)

Peter Hutterer peter.hutterer at who-t.net
Wed Apr 7 19:30:38 PDT 2010


miSpriteRealizeCursor is called whenever a device is set floating and it's
fine to do so, no need for an error message.
Same goes for the other miSprite messages.

X.Org Bug 26843 <http://bugs.freedesktop.org/show_bug.cgi?id=26843>

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
On Wed, Apr 07, 2010 at 06:43:41PM -0400, Thomas Jaeger wrote:
> Thanks.  How about the other error messages of this form? I'm also
> hitting miSpriteSetCursor in bug #26843;  I don't know how useful the
> error message is for the remaining functions (miSpriteRestoreCursor etc.).

whoops, forgot about those, sorry.

 mi/misprite.c |   27 ++++++---------------------
 1 files changed, 6 insertions(+), 21 deletions(-)

diff --git a/mi/misprite.c b/mi/misprite.c
index 2ec6782..ac025e1 100644
--- a/mi/misprite.c
+++ b/mi/misprite.c
@@ -765,10 +765,8 @@ miSpriteRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
 
     pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey);
     if (!IsMaster(pDev) && !pDev->u.master)
-    {
-        ErrorF("[mi] miSpriteRealizeCursor called for floating device.\n");
         return FALSE;
-    }
+
     pCursorInfo = MISPRITE(pDev);
 
     if (pCursor == pCursorInfo->pCursor)
@@ -796,10 +794,8 @@ miSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen,
     pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey);
 
     if (!IsMaster(pDev) && !pDev->u.master)
-    {
-        ErrorF("[mi] miSpriteSetCursor called for floating device.\n");
         return;
-    }
+
     pPointer = MISPRITE(pDev);
 
     if (!pCursor)
@@ -913,10 +909,8 @@ miSpriteMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
 
     pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey);
     if (!IsMaster(pDev) && !pDev->u.master)
-    {
-        ErrorF("[mi] miSpriteMoveCursor called for floating device.\n");
         return;
-    }
+
     pCursor = MISPRITE(pDev)->pCursor;
 
     miSpriteSetCursor (pDev, pScreen, pCursor, x, y);
@@ -981,10 +975,8 @@ miSpriteRemoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen)
 
 
     if (!IsMaster(pDev) && !pDev->u.master)
-    {
-        ErrorF("[mi] miSpriteRemoveCursor called for floating device.\n");
         return;
-    }
+
     DamageDrawInternal (pScreen, TRUE);
     pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey);
     pCursorInfo = MISPRITE(pDev);
@@ -1021,10 +1013,8 @@ miSpriteSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen)
     miCursorInfoPtr     pCursorInfo;
 
     if (!IsMaster(pDev) && !pDev->u.master)
-    {
-        ErrorF("[mi] miSpriteSaveUnderCursor called for floating device.\n");
         return;
-    }
+
     DamageDrawInternal (pScreen, TRUE);
     pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey);
     pCursorInfo = MISPRITE(pDev);
@@ -1064,10 +1054,7 @@ miSpriteRestoreCursor (DeviceIntPtr pDev, ScreenPtr pScreen)
     miCursorInfoPtr     pCursorInfo;
 
     if (!IsMaster(pDev) && !pDev->u.master)
-    {
-        ErrorF("[mi] miSpriteRestoreCursor called for floating device.\n");
         return;
-    }
 
     DamageDrawInternal (pScreen, TRUE);
     pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey);
@@ -1108,10 +1095,8 @@ miSpriteComputeSaved (DeviceIntPtr pDev, ScreenPtr pScreen)
     miCursorInfoPtr pCursorInfo;
 
     if (!IsMaster(pDev) && !pDev->u.master)
-    {
-        ErrorF("[mi] miSpriteComputeSaved called for floating device.\n");
         return;
-    }
+
     pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey);
     pCursorInfo = MISPRITE(pDev);
 
-- 
1.6.6.1



More information about the xorg-devel mailing list