diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-05-21 12:07:03 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-05-22 15:44:57 +1000 |
commit | b25e29e8014927815d4fdc9c416bfeb2af0ecba6 (patch) | |
tree | 4934c369396555644d36b68a5facac430ed784b4 /mi | |
parent | c9df51b070377ca33e48644dbc842b6e3dfb2975 (diff) |
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 <peter.hutterer@who-t.net>
Diffstat (limited to 'mi')
-rw-r--r-- | mi/mipointer.c | 4 | ||||
-rw-r--r-- | mi/misprite.c | 4 |
2 files changed, 4 insertions, 4 deletions
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) |