[PATCH 3/5] mi: Fix block handler wrapping in miSprite

Keith Packard keithp at keithp.com
Fri Apr 18 14:31:18 PDT 2014


miSpriteBlockHandler was leaving the BlockHandler wrapped until just
before calling any nested block handler. If any code executed before
that added or removed block handlers, the wrapping chain would have
been broken.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 mi/misprite.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mi/misprite.c b/mi/misprite.c
index eea731a..68a49be 100644
--- a/mi/misprite.c
+++ b/mi/misprite.c
@@ -520,6 +520,8 @@ miSpriteBlockHandler(ScreenPtr pScreen, void *pTimeout,
     miCursorInfoPtr pCursorInfo;
     Bool WorkToDo = FALSE;
 
+    SCREEN_PROLOGUE(pPriv, pScreen, BlockHandler);
+
     for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
         if (DevHasCursor(pDev)) {
             pCursorInfo = MISPRITE(pDev);
@@ -543,8 +545,6 @@ miSpriteBlockHandler(ScreenPtr pScreen, void *pTimeout,
         }
     }
 
-    SCREEN_PROLOGUE(pPriv, pScreen, BlockHandler);
-
     (*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask);
 
     if (WorkToDo)
-- 
1.9.2



More information about the xorg-devel mailing list