From b25e29e8014927815d4fdc9c416bfeb2af0ecba6 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 21 May 2009 12:07:03 +1000 Subject: mi: use GetMaster() from MIPOINTER and MISPRITE. Both may in some cases be called for a SD attached to a master keyboard. In this case, we need to get the right master device (i.e. the pointer). Signed-off-by: Peter Hutterer --- mi/mipointer.c | 4 ++-- mi/misprite.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'mi') diff --git a/mi/mipointer.c b/mi/mipointer.c index fdad77b7c..e1f63be4e 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -51,9 +51,9 @@ static int miPointerPrivKeyIndex; static DevPrivateKey miPointerPrivKey = &miPointerPrivKeyIndex; #define MIPOINTER(dev) \ - ((DevHasCursor((dev)) || (!IsMaster(isMaster) && !dev->u.master)) ? \ + ((!IsMaster(dev) && !dev->u.master) ? \ (miPointerPtr)dixLookupPrivate(&(dev)->devPrivates, miPointerPrivKey): \ - (miPointerPtr)dixLookupPrivate(&(dev)->u.master->devPrivates, miPointerPrivKey)) + (miPointerPtr)dixLookupPrivate(&(GetMaster(dev, MASTER_POINTER))->devPrivates, miPointerPrivKey)) static Bool miPointerRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); diff --git a/mi/misprite.c b/mi/misprite.c index 3f4c573e3..2ec67827e 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -143,9 +143,9 @@ typedef struct { #endif #define MISPRITE(dev) \ - ((DevHasCursor(dev)) ? \ + ((!IsMaster(dev) && !dev->u.master) ? \ (miCursorInfoPtr)dixLookupPrivate(&dev->devPrivates, miSpriteDevPrivatesKey) : \ - (miCursorInfoPtr)dixLookupPrivate(&dev->u.master->devPrivates, miSpriteDevPrivatesKey)) + (miCursorInfoPtr)dixLookupPrivate(&(GetMaster(dev, MASTER_POINTER))->devPrivates, miSpriteDevPrivatesKey)) static void miSpriteDisableDamage(ScreenPtr pScreen, miSpriteScreenPtr pScreenPriv) -- cgit v1.2.3