diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-31 10:44:28 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-08-03 10:11:48 +1000 |
commit | f48dfcc1b772a09428e328c72124ea0d46a73416 (patch) | |
tree | f6e8b8fc9c357e7b304c477e42ec31ead0d8d44c | |
parent | d3e5629fac224d53a972df5e2a87db02534f9b17 (diff) |
xfixes: allocate CurrentCursor for all devices.
XFixes requires cursor notifies to clients when the cursor changes. This
should work on the ClientPointer and then on all master pointers. Hence
change CurrentCursor to a MAXDEVICES array.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | xfixes/cursor.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xfixes/cursor.c b/xfixes/cursor.c index d91dbff70..45891bbe1 100644 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -63,7 +63,7 @@ static RESTYPE CursorClientType; static RESTYPE CursorHideCountType; static RESTYPE CursorWindowType; -static CursorPtr CursorCurrent; +static CursorPtr CursorCurrent[MAXDEVICES]; static CursorPtr pInvisibleCursor = NULL; static int CursorScreenPrivateKeyIndex; @@ -162,11 +162,11 @@ CursorDisplayCursor (DeviceIntPtr pDev, ret = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor); } - if (pCursor != CursorCurrent) + if (pCursor != CursorCurrent[pDev->id]) { CursorEventPtr e; - CursorCurrent = pCursor; + CursorCurrent[pDev->id] = pCursor; for (e = cursorEvents; e; e = e->next) { if ((e->eventMask & XFixesDisplayCursorNotifyMask) && @@ -380,7 +380,7 @@ ProcXFixesGetCursorImage (ClientPtr client) int npixels, width, height, rc, x, y; REQUEST_SIZE_MATCH(xXFixesGetCursorImageReq); - pCursor = CursorCurrent; + pCursor = CursorCurrent[PickPointer(client)->id]; if (!pCursor) return BadCursor; rc = XaceHook(XACE_RESOURCE_ACCESS, client, pCursor->id, RT_CURSOR, @@ -532,7 +532,7 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) int rc, x, y; REQUEST_SIZE_MATCH(xXFixesGetCursorImageAndNameReq); - pCursor = CursorCurrent; + pCursor = CursorCurrent[PickPointer(client)->id]; if (!pCursor) return BadCursor; rc = XaceHook(XACE_RESOURCE_ACCESS, client, pCursor->id, RT_CURSOR, @@ -916,7 +916,7 @@ ProcXFixesHideCursor (ClientPtr client) for (dev = inputInfo.devices; dev; dev = dev->next) { if (IsMaster(dev) && IsPointerDevice(dev)) - CursorDisplayCursor(dev, pWin->drawable.pScreen, CursorCurrent); + CursorDisplayCursor(dev, pWin->drawable.pScreen, CursorCurrent[dev->id]); } } @@ -1015,7 +1015,7 @@ CursorFreeHideCount (pointer data, XID id) for (dev = inputInfo.devices; dev; dev = dev->next) { if (IsMaster(dev) && IsPointerDevice(dev)) - CursorDisplayCursor(dev, pScreen, CursorCurrent); + CursorDisplayCursor(dev, pScreen, CursorCurrent[dev->id]); } return 1; |