mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
Xi: move SendEventToAllWindows and FindInterestedChildren to exevents
Move SendEventToAllWindows and FindInterestedChildren from chgptr to exevents, so the DIX can more easily use it. Clean up two warnings (type mismatch, unused variable) in exevents.c.
This commit is contained in:
committed by
Daniel Stone
parent
c2fab469b6
commit
ca474e0920
41
Xi/chgptr.c
41
Xi/chgptr.c
@@ -178,47 +178,6 @@ DeleteFocusClassDeviceStruct(DeviceIntPtr dev)
|
||||
dev->focus = NULL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Send an event to interested clients in all windows on all screens.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count)
|
||||
{
|
||||
int i;
|
||||
WindowPtr pWin, p1;
|
||||
|
||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
||||
pWin = WindowTable[i];
|
||||
(void)DeliverEventsToWindow(pWin, ev, count, mask, NullGrab, dev->id);
|
||||
p1 = pWin->firstChild;
|
||||
FindInterestedChildren(dev, p1, mask, ev, count);
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Walk through the window tree, finding all clients that want to know
|
||||
* about the ChangeDeviceNotify Event.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
FindInterestedChildren(DeviceIntPtr dev, WindowPtr p1, Mask mask,
|
||||
xEvent * ev, int count)
|
||||
{
|
||||
WindowPtr p2;
|
||||
|
||||
while (p1) {
|
||||
p2 = p1->firstChild;
|
||||
(void)DeliverEventsToWindow(p1, ev, count, mask, NullGrab, dev->id);
|
||||
FindInterestedChildren(dev, p2, mask, ev, count);
|
||||
p1 = p1->nextSib;
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure writes the reply for the XChangePointerDevice
|
||||
|
||||
Reference in New Issue
Block a user