summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2008-12-18 15:43:18 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-01-08 11:45:22 +1000
commit72ad4a85cc0ffe60a90011d65ef718d5852beae4 (patch)
tree4f67a4adb51f7c51c651359c7e93f2394959f895
parent0aa4460c3b4f9bb17d5412d76fa8c4c501132429 (diff)
dix: remove now unused "exclude" parameter from FirstPointerChild
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--dix/enterleave.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/dix/enterleave.c b/dix/enterleave.c
index df915f509..fbe7af433 100644
--- a/dix/enterleave.c
+++ b/dix/enterleave.c
@@ -73,13 +73,12 @@ HasPointer(WindowPtr win)
/**
* Search for the first window below @win that has a pointer directly within
* it's boundaries (excluding boundaries of its own descendants).
- * Windows including @exclude and its descendants are ignored.
*
* @return The child window that has the pointer within its boundaries or
* NULL.
*/
static WindowPtr
-FirstPointerChild(WindowPtr win, WindowPtr exclude)
+FirstPointerChild(WindowPtr win)
{
static WindowPtr *queue = NULL;
static int queue_size = 256; /* allocated size of queue */
@@ -88,7 +87,7 @@ FirstPointerChild(WindowPtr win, WindowPtr exclude)
int queue_len = 0; /* no of elements in queue */
int queue_head = 0; /* pos of current element */
- if (!win || win == exclude || !win->firstChild)
+ if (!win || !win->firstChild)
return NULL;
if (!queue && !(queue = xcalloc(queue_size, sizeof(WindowPtr))))
@@ -100,12 +99,6 @@ FirstPointerChild(WindowPtr win, WindowPtr exclude)
while (queue_len--)
{
- if (queue[queue_head] == exclude)
- {
- queue_head = (queue_head + 1) % queue_size;
- continue;
- }
-
if (queue[queue_head] != win && HasPointer(queue[queue_head]))
return queue[queue_head];
@@ -236,7 +229,7 @@ CoreEnterNotifies(DeviceIntPtr dev,
may need to be changed from Virtual to NonlinearVirtual depending
on the previous P(W). */
- if (!HasPointer(parent) && !FirstPointerChild(parent, None))
+ if (!HasPointer(parent) && !FirstPointerChild(parent))
CoreEnterLeaveEvent(dev, EnterNotify, mode, detail, parent,
child->drawable.id);
}
@@ -275,7 +268,7 @@ CoreLeaveNotifies(DeviceIntPtr dev,
/* If one window has a pointer or a child with a pointer, skip some
* work and exit. */
- if (HasPointer(win) || FirstPointerChild(win, None))
+ if (HasPointer(win) || FirstPointerChild(win))
return;
CoreEnterLeaveEvent(dev, LeaveNotify, mode, detail, win, child->drawable.id);
@@ -340,7 +333,7 @@ CoreEnterLeaveNonLinear(DeviceIntPtr dev,
if (!HasPointer(A))
{
- WindowPtr child = FirstPointerChild(A, None);
+ WindowPtr child = FirstPointerChild(A);
if (child)
CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyInferior, A, None);
else
@@ -384,7 +377,7 @@ CoreEnterLeaveNonLinear(DeviceIntPtr dev,
if (!HasPointer(B))
{
- WindowPtr child = FirstPointerChild(B, None);
+ WindowPtr child = FirstPointerChild(B);
if (child)
CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyInferior, B, None);
else
@@ -422,7 +415,7 @@ CoreEnterLeaveToAncestor(DeviceIntPtr dev,
*/
if (!HasPointer(A))
{
- WindowPtr child = FirstPointerChild(A, None);
+ WindowPtr child = FirstPointerChild(A);
if (child)
CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyInferior, A, None);
else
@@ -498,7 +491,7 @@ CoreEnterLeaveToDescendant(DeviceIntPtr dev,
if (!HasPointer(B))
{
- WindowPtr child = FirstPointerChild(B, None);
+ WindowPtr child = FirstPointerChild(B);
if (child)
CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyInferior, B, None);
else