summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Lyngstol <kristian@bohemians.org>2008-05-22 10:41:39 +0200
committerKristian Lyngstol <kristian@bohemians.org>2008-05-22 10:41:39 +0200
commit2d1719edc6237b9db331b59ff14eef2329005eb4 (patch)
tree86f91958ab4db1e59a22848c40bb2df49d02367d
parentb6f04764b93d3c046cae94fa1b1f25ec0ed5bf62 (diff)
downloadmousepoll-2d1719edc6237b9db331b59ff14eef2329005eb4.tar.gz
mousepoll-2d1719edc6237b9db331b59ff14eef2329005eb4.tar.bz2
Allow removal of mousepoll clients during client handeling
-rw-r--r--mousepoll.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mousepoll.c b/mousepoll.c
index 81cf3b3..2dd540d 100644
--- a/mousepoll.c
+++ b/mousepoll.c
@@ -120,9 +120,13 @@ updatePosition (void *c)
if (getMousePosition (s))
{
- for (mc = ms->clients; mc; mc = mc->next)
+ MousepollClient *next;
+ for (mc = ms->clients; mc; mc = next)
+ {
+ next = mc->next;
if (mc->update)
(*mc->update) (s, ms->posX, ms->posY);
+ }
}
return TRUE;