summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-11-28 09:19:49 +1000
committerPeter Hutterer <peter.hutterer@redhat.com>2008-12-01 08:16:56 +1000
commitaba1cbaadcde50a7a25f8aee06b66eec67a9145e (patch)
treeba389738c6b91f27c5e02ac5cb4f0c303f022918 /dix
parent9739fac04520e3e0c338f74cedb58855a17fc899 (diff)
dix: No DeviceEnterLeave events in server 1.6
Diffstat (limited to 'dix')
-rw-r--r--dix/enterleave.c36
-rw-r--r--dix/events.c73
2 files changed, 0 insertions, 109 deletions
diff --git a/dix/enterleave.c b/dix/enterleave.c
index 8176f9618..d16f922e0 100644
--- a/dix/enterleave.c
+++ b/dix/enterleave.c
@@ -193,9 +193,6 @@ EnterNotifies(DeviceIntPtr dev,
if (core)
CoreEnterLeaveEvent(dev, EnterNotify, mode, detail, parent,
child->drawable.id);
- else
- DeviceEnterLeaveEvent(dev, DeviceEnterNotify, mode, detail, parent,
- child->drawable.id);
}
/**
@@ -219,9 +216,6 @@ LeaveNotifies(DeviceIntPtr dev,
if (core)
CoreEnterLeaveEvent(dev, LeaveNotify, mode, detail, win,
child->drawable.id);
- else
- DeviceEnterLeaveEvent(dev, DeviceLeaveNotify, mode, detail, win,
- child->drawable.id);
child = win;
}
}
@@ -489,35 +483,6 @@ CoreEnterLeaveEvents(DeviceIntPtr dev,
EnterWindow(dev, to, mode);
}
-static void
-DeviceEnterLeaveEvents(DeviceIntPtr dev,
- WindowPtr from,
- WindowPtr to,
- int mode)
-{
- if (IsParent(from, to))
- {
- DeviceEnterLeaveEvent(dev, DeviceLeaveNotify, mode, NotifyInferior, from, None);
- EnterNotifies(dev, from, to, mode, NotifyVirtual, FALSE);
- DeviceEnterLeaveEvent(dev, DeviceEnterNotify, mode, NotifyAncestor, to, None);
- }
- else if (IsParent(to, from))
- {
- DeviceEnterLeaveEvent(dev, DeviceLeaveNotify, mode, NotifyAncestor, from, None);
- LeaveNotifies(dev, from, to, mode, NotifyVirtual, FALSE);
- DeviceEnterLeaveEvent(dev, DeviceEnterNotify, mode, NotifyInferior, to, None);
- }
- else
- { /* neither from nor to is descendent of the other */
- WindowPtr common = CommonAncestor(to, from);
- /* common == NullWindow ==> different screens */
- DeviceEnterLeaveEvent(dev, DeviceLeaveNotify, mode, NotifyNonlinear, from, None);
- LeaveNotifies(dev, from, common, mode, NotifyNonlinearVirtual, FALSE);
- EnterNotifies(dev, common, to, mode, NotifyNonlinearVirtual, FALSE);
- DeviceEnterLeaveEvent(dev, DeviceEnterNotify, mode, NotifyNonlinear, to, None);
- }
-}
-
/**
* Figure out if enter/leave events are necessary and send them to the
* appropriate windows.
@@ -538,5 +503,4 @@ DoEnterLeaveEvents(DeviceIntPtr pDev,
return;
CoreEnterLeaveEvents(pDev, fromWin, toWin, mode);
- DeviceEnterLeaveEvents(pDev, fromWin, toWin, mode);
}
diff --git a/dix/events.c b/dix/events.c
index bfc84948d..d1dc8edd7 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -4274,79 +4274,6 @@ CoreEnterLeaveEvent(
}
}
-void
-DeviceEnterLeaveEvent(
- DeviceIntPtr mouse,
- int type,
- int mode,
- int detail,
- WindowPtr pWin,
- Window child)
-{
- xEvent event;
- GrabPtr grab = mouse->deviceGrab.grab;
- deviceEnterNotify *devEnterLeave;
- int mskidx;
- OtherInputMasks *inputMasks;
- Mask mask;
- DeviceIntPtr keybd = GetPairedDevice(mouse);
- BOOL sameScreen;
-
- if (grab) {
- mask = (pWin == grab->window) ? grab->eventMask : 0;
- if (grab->ownerEvents)
- mask |= EventMaskForClient(pWin, rClient(grab));
- } else {
- mask = pWin->eventMask | wOtherEventMasks(pWin);
- }
-
- /* we don't have enough bytes, so we squash flags and mode into
- one byte, and use the last byte for the deviceid. */
- devEnterLeave = (deviceEnterNotify*)&event;
- devEnterLeave->detail = detail;
- devEnterLeave->time = currentTime.milliseconds;
- devEnterLeave->rootX = mouse->spriteInfo->sprite->hot.x;
- devEnterLeave->rootY = mouse->spriteInfo->sprite->hot.y;
- FixUpEventFromWindow(mouse, &event, pWin, None, FALSE);
- sameScreen = event.u.keyButtonPointer.sameScreen;
-
- devEnterLeave->child = child;
- devEnterLeave->type = type;
- devEnterLeave->deviceid = mouse->id;
- devEnterLeave->mode = mode;
- devEnterLeave->mode |= (sameScreen ? (ELFlagSameScreen << 4) : 0);
-
-#ifdef XKB
- if (!noXkbExtension) {
- devEnterLeave->state = mouse->button->state & 0x1f00;
- if (keybd)
- devEnterLeave->state |=
- XkbGrabStateFromRec(&keybd->key->xkbInfo->state);
- } else
-#endif
- {
- devEnterLeave->state = (keybd) ? keybd->key->state : 0;
- devEnterLeave->state |= mouse->button->state;
- }
-
- mskidx = mouse->id;
- inputMasks = wOtherInputMasks(pWin);
- if (inputMasks &&
- (filters[mouse->id][devEnterLeave->type] &
- inputMasks->deliverableEvents[mskidx]))
- {
- if (grab)
- TryClientEvents(rClient(grab), mouse,
- (xEvent*)devEnterLeave, 1, mask,
- filters[mouse->id][devEnterLeave->type], grab);
- else
- DeliverEventsToWindow(mouse, pWin, (xEvent*)devEnterLeave, 1,
- filters[mouse->id][devEnterLeave->type],
- NullGrab, mouse->id);
- }
-
-}
-
static void
FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin)
{