diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-03-07 18:19:20 +1030 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-03-07 18:19:20 +1030 |
commit | 537bc2ead4d154552cbdc3a19e335f82af63792c (patch) | |
tree | 444dcf6acb5e72c45b352fef9b6c17d794f66f1e /dix/cursor.c | |
parent | 39aa79177196e21bcdbaf8e44adead9ef91e6ee5 (diff) |
Xi: Don't deactivate core grabs from non-core button/key releases.
dix: set coreGrab flag for grabs caused by GrabPointer and button presses.
remove virtual core devices from device list, only real devices are in
the list now.
Auto-pair each keyboard with a real pointer if one is available,
provides multiple keyboards automatically after startup if devices
are configured.
fix GuessFreePointerDevice() to do what it's supposed to do.
mi: fix: call miPointerMove from miPointerWarpCursor.
fix: remove unused id field from miCursorInfoRec
don't update sprite for virtual core pointer.
Diffstat (limited to 'dix/cursor.c')
-rw-r--r-- | dix/cursor.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/dix/cursor.c b/dix/cursor.c index cf515c11a..e44a5efb0 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -440,6 +440,33 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { pscr = screenInfo.screens[nscr]; + + if (!(*pscr->RealizeCursor)(inputInfo.pointer, pscr, pCurs)) + { + DeviceIntPtr pDevIt = inputInfo.devices; /*dev iterator*/ + /* Realize for core pointer failed. Unrealize everything from + * previous screens. + */ + while (--nscr >= 0) + { + pscr = screenInfo.screens[nscr]; + /* now unrealize all devices on previous screens */ + ( *pscr->UnrealizeCursor)(inputInfo.pointer, pscr, pCurs); + + pDevIt = inputInfo.devices; + while (pDevIt) + { + if (DevHasCursor(pDevIt)) + ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); + pDevIt = pDevIt->next; + } + ( *pscr->UnrealizeCursor)(pDev, pscr, pCurs); + } + FreeCursorBits(bits); + xfree(pCurs); + return BadAlloc; + } + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) @@ -459,10 +486,15 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, ( *pscr->UnrealizeCursor)(pDevIt, pscr, pCurs); pDevIt = pDevIt->next; } + + (*pscr->UnrealizeCursor)(inputInfo.pointer, pscr, pCurs); + while (--nscr >= 0) { pscr = screenInfo.screens[nscr]; /* now unrealize all devices on previous screens */ + ( *pscr->UnrealizeCursor)(inputInfo.pointer, pscr, pCurs); + pDevIt = inputInfo.devices; while (pDevIt) { |