dix: Rework Enter/Leave semaphore system.
Instead of a simple counter, use bits to keep track of which device is where etc. When device enters a window (or sets focus), the bit matching the device is set, when it leaves again, it is unset. If there are 0 bits set, then Leave/Enter/Focus events may be sent to the client. Same theory as before, but this should get around the insanity with Grab/Ungrab special cases. Those cases are basically untested though.
This commit is contained in:
@@ -224,8 +224,7 @@ EnableDevice(DeviceIntPtr dev)
|
||||
if (dev->spriteInfo->spriteOwner)
|
||||
{
|
||||
InitializeSprite(dev, WindowTable[0]);
|
||||
((FocusSemaphoresPtr)dixLookupPrivate(&(WindowTable[0])->devPrivates,
|
||||
FocusPrivatesKey))->enterleave++;
|
||||
ENTER_LEAVE_SEMAPHORE_SET(WindowTable[0], dev);
|
||||
}
|
||||
else if ((other = NextFreePointerDevice()) == NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user