dix: DeliverEventsToWindow adjusted for MPX

mi:     sprite debugging disabled
This commit is contained in:
Peter Hutterer 2006-11-22 17:58:57 +10:30 committed by Peter Hutterer
parent 8c16f21d5d
commit f52d53e060
5 changed files with 59 additions and 36 deletions

View File

@ -13,9 +13,10 @@ Xi: fix: accessing other->buttons for keyboard segfaulted the server
Files:
mi/misprite.c
mi/mipointer.c
dix/events.c
Xi/exevents.c
dix/events.c
Xi/exevents.c
____________________________________________________________
dix GetSpriteWindow() adjusted for MPX
added device dependency for MPX to DoEnterLeaveEvents,
@ -23,11 +24,23 @@ dix GetSpriteWindow() adjusted for MPX
FixUpEventFromWindow.
Files:
Xext/security.c
Xi/exevents.c
ddx/ddxFakeMtn.c
dix/events.c
include/dix.h
Xext/security.c
Xi/exevents.c
ddx/ddxFakeMtn.c
dix/events.c
include/dix.h
____________________________________________________________
dix: DeliverEventsToWindow adjusted for MPX
mi: sprite debugging disabled
Files:
dix/events.c
Xi/exevents.c
mi/misprite.c
include/dix.h
== 21.11.06 ==
@ -43,6 +56,7 @@ Files:
TAG: MPX_BEFORE_MIDC_API_BREAK
____________________________________________________________
mi: added device ID to miSpriteCursorFuncRec functions
added MPX code to midispcur.c
@ -55,6 +69,7 @@ Files:
BUG: Core pointer changes whenever MPX cursor changes shape.
____________________________________________________________
mi: constrain MPX cursors to screen
@ -66,6 +81,7 @@ Files:
TAG: MPX_BEFORE_DIX_API_BREAK
____________________________________________________________
dix: moved sprite from static to be pointer of type SpritePtr
added SpriteRecs for MPX devices
@ -89,6 +105,8 @@ Files:
xfixes/cursor.c
mi/mieq.c
____________________________________________________________
dix: WindowsRestructured() calls CheckMotion() on all devices
mi: core pointer was checked twice in miSpriteReportDamage,
@ -112,6 +130,7 @@ Files:
mi/misprite.c
mi/mipointer.c
____________________________________________________________
mi: added MPX to miSprite functions.
@ -149,6 +168,7 @@ Files:
hw/xfree86/ramdac/xf86Cursor.c
hw/xfree86/rac/xf86RAC.c
____________________________________________________________
mi:
added miCursorInfoRec to contain info of the MPX cursors.
@ -195,6 +215,7 @@ Files:
configure.ac
include/dix-config.h.in
____________________________________________________________
dix: added isMPdev field to _DeviceIntRec, is used in GetPointerEvents()
@ -210,6 +231,7 @@ Files:
include/inputstr.h
mi/mieq.c
____________________________________________________________
mieq: EQ processing handles MP devices

View File

@ -394,7 +394,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
event.window = pWin->drawable.id;
event.time = currentTime.milliseconds;
(void)DeliverEventsToWindow(pWin, (xEvent *) & event, 1,
(void)DeliverEventsToWindow(dev, pWin, (xEvent *) & event, 1,
DeviceFocusChangeMask, NullGrab, dev->id);
if ((type == DeviceFocusIn) &&
@ -490,7 +490,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
}
}
(void)DeliverEventsToWindow(pWin, (xEvent *) sev, evcount,
(void)DeliverEventsToWindow(dev, pWin, (xEvent *) sev, evcount,
DeviceStateNotifyMask, NullGrab, dev->id);
xfree(sev);
}
@ -820,7 +820,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate,
ev->u.u.type |= 0x80;
if (propagate) {
for (; pWin; pWin = pWin->parent) {
if (DeliverEventsToWindow(pWin, ev, count, mask, NullGrab, d->id))
if (DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab, d->id))
return Success;
if (pWin == effectiveFocus)
return Success;
@ -830,7 +830,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate,
break;
}
} else
(void)(DeliverEventsToWindow(pWin, ev, count, mask, NullGrab, d->id));
(void)(DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab, d->id));
return Success;
}
@ -1229,7 +1229,7 @@ FindInterestedChildren(DeviceIntPtr dev, WindowPtr p1, Mask mask,
while (p1) {
p2 = p1->firstChild;
(void)DeliverEventsToWindow(p1, ev, count, mask, NullGrab, dev->id);
(void)DeliverEventsToWindow(dev, p1, ev, count, mask, NullGrab, dev->id);
FindInterestedChildren(dev, p2, mask, ev, count);
p1 = p1->nextSib;
}
@ -1249,7 +1249,7 @@ SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count)
for (i = 0; i < screenInfo.numScreens; i++) {
pWin = WindowTable[i];
(void)DeliverEventsToWindow(pWin, ev, count, mask, NullGrab, dev->id);
(void)DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab, dev->id);
p1 = pWin->firstChild;
FindInterestedChildren(dev, p1, mask, ev, count);
}

View File

@ -1673,8 +1673,8 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
}
int
DeliverEventsToWindow(register WindowPtr pWin, xEvent *pEvents, int count,
Mask filter, GrabPtr grab, int mskidx)
DeliverEventsToWindow(DeviceIntPtr pDev, register WindowPtr pWin, xEvent
*pEvents, int count, Mask filter, GrabPtr grab, int mskidx)
{
int deliveries = 0, nondeliveries = 0;
int attempt;
@ -1736,7 +1736,7 @@ DeliverEventsToWindow(register WindowPtr pWin, xEvent *pEvents, int count,
{
GrabRec tempGrab;
tempGrab.device = inputInfo.pointer;
tempGrab.device = pDev;
tempGrab.resource = client->clientAsMask;
tempGrab.window = pWin;
tempGrab.ownerEvents = (deliveryMask & OwnerGrabButtonMask) ? TRUE : FALSE;
@ -1745,11 +1745,11 @@ DeliverEventsToWindow(register WindowPtr pWin, xEvent *pEvents, int count,
tempGrab.pointerMode = GrabModeAsync;
tempGrab.confineTo = NullWindow;
tempGrab.cursor = NullCursor;
(*inputInfo.pointer->ActivateGrab)(inputInfo.pointer, &tempGrab,
(*inputInfo.pointer->ActivateGrab)(pDev, &tempGrab,
currentTime, TRUE);
}
else if ((type == MotionNotify) && deliveries)
inputInfo.pointer->valuator->motionHintWindow = pWin;
pDev->valuator->motionHintWindow = pWin;
#ifdef XINPUT
else
{
@ -1911,7 +1911,7 @@ DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab,
if (inputMasks && (inputMasks->inputEvents[mskidx] & filter))
{
FixUpEventFromWindow(dev, xE, pWin, child, FALSE);
deliveries = DeliverEventsToWindow(pWin, xE, count, filter,
deliveries = DeliverEventsToWindow(dev, pWin, xE, count, filter,
grab, mskidx);
if (deliveries > 0)
return deliveries;
@ -1936,7 +1936,7 @@ DeliverDeviceEvents(register WindowPtr pWin, register xEvent *xE, GrabPtr grab,
if ((wOtherEventMasks(pWin)|pWin->eventMask) & filter)
{
FixUpEventFromWindow(dev, xE, pWin, child, FALSE);
deliveries = DeliverEventsToWindow(pWin, xE, count, filter,
deliveries = DeliverEventsToWindow(dev, pWin, xE, count, filter,
grab, 0);
if (deliveries > 0)
return deliveries;
@ -1971,20 +1971,20 @@ DeliverEvents(register WindowPtr pWin, register xEvent *xE, int count,
if ((filter & SubstructureNotifyMask) && (xE->u.u.type != CreateNotify))
xE->u.destroyNotify.event = pWin->drawable.id;
if (filter != StructureAndSubMask)
return DeliverEventsToWindow(pWin, xE, count, filter, NullGrab, 0);
deliveries = DeliverEventsToWindow(pWin, xE, count, StructureNotifyMask,
return DeliverEventsToWindow(inputInfo.pointer, pWin, xE, count, filter, NullGrab, 0);
deliveries = DeliverEventsToWindow(inputInfo.pointer, pWin, xE, count, StructureNotifyMask,
NullGrab, 0);
if (pWin->parent)
{
xE->u.destroyNotify.event = pWin->parent->drawable.id;
deliveries += DeliverEventsToWindow(pWin->parent, xE, count,
deliveries += DeliverEventsToWindow(inputInfo.pointer, pWin->parent, xE, count,
SubstructureNotifyMask, NullGrab,
0);
if (xE->u.u.type == ReparentNotify)
{
xE->u.destroyNotify.event = otherParent->drawable.id;
deliveries += DeliverEventsToWindow(otherParent, xE, count,
SubstructureNotifyMask,
deliveries += DeliverEventsToWindow(inputInfo.pointer,
otherParent, xE, count, SubstructureNotifyMask,
NullGrab, 0);
}
}
@ -2723,7 +2723,7 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count)
FixUpEventFromWindow(inputInfo.pointer, xE, focus, None, FALSE);
if (xE->u.u.type & EXTENSION_EVENT_BASE)
mskidx = keybd->id;
(void)DeliverEventsToWindow(focus, xE, count, filters[xE->u.u.type],
(void)DeliverEventsToWindow(keybd, focus, xE, count, filters[xE->u.u.type],
NullGrab, mskidx);
}
@ -3394,7 +3394,7 @@ EnterLeaveEvent(
(void)TryClientEvents(rClient(grab), &event, 1, mask,
filters[type], grab);
else
(void)DeliverEventsToWindow(pWin, &event, 1, filters[type],
(void)DeliverEventsToWindow(pDev, pWin, &event, 1, filters[type],
NullGrab, 0);
}
if ((type == EnterNotify) && (mask & KeymapStateMask))
@ -3416,7 +3416,7 @@ EnterLeaveEvent(
(void)TryClientEvents(rClient(grab), (xEvent *)&ke, 1, mask,
KeymapStateMask, grab);
else
(void)DeliverEventsToWindow(pWin, (xEvent *)&ke, 1,
(void)DeliverEventsToWindow(pDev, pWin, (xEvent *)&ke, 1,
KeymapStateMask, NullGrab, 0);
}
}
@ -3507,8 +3507,8 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, register WindowPtr
event.u.u.type = type;
event.u.u.detail = detail;
event.u.focus.window = pWin->drawable.id;
(void)DeliverEventsToWindow(pWin, &event, 1, filters[type], NullGrab,
0);
(void)DeliverEventsToWindow(dev, pWin, &event, 1, filters[type], NullGrab,
0);
if ((type == FocusIn) &&
((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask))
{
@ -3523,7 +3523,7 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, register WindowPtr
#endif
memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31);
ke.type = KeymapNotify;
(void)DeliverEventsToWindow(pWin, (xEvent *)&ke, 1,
(void)DeliverEventsToWindow(dev, pWin, (xEvent *)&ke, 1,
KeymapStateMask, NullGrab, 0);
}
}
@ -4318,8 +4318,8 @@ ProcSendEvent(ClientPtr client)
{
for (;pWin; pWin = pWin->parent)
{
if (DeliverEventsToWindow(pWin, &stuff->event, 1, stuff->eventMask,
NullGrab, 0))
if (DeliverEventsToWindow(inputInfo.pointer, pWin, &stuff->event,
1, stuff->eventMask, NullGrab, 0))
return Success;
if (pWin == effectiveFocus)
return Success;
@ -4329,8 +4329,8 @@ ProcSendEvent(ClientPtr client)
}
}
else
(void)DeliverEventsToWindow(pWin, &stuff->event, 1, stuff->eventMask,
NullGrab, 0);
(void)DeliverEventsToWindow(inputInfo.pointer, pWin, &stuff->event, 1,
stuff->eventMask, NullGrab, 0);
return Success;
}

View File

@ -570,6 +570,7 @@ extern void ReleaseActiveGrabs(
ClientPtr client);
extern int DeliverEventsToWindow(
DeviceIntPtr /* pWin */,
WindowPtr /* pWin */,
xEventPtr /* pEvents */,
int /* count */,

View File

@ -72,7 +72,7 @@ static miCursorInfoPtr DevToSprite(DeviceIntPtr pDev, ScreenPtr pScreen);
#endif
#define SPRITE_DEBUG_ENABLE 1
#define SPRITE_DEBUG_ENABLE 0
#if SPRITE_DEBUG_ENABLE
#define SPRITE_DEBUG(x) ErrorF x
#else