diff options
author | Kristian Lyngstol <kristian@bohemians.org> | 2008-05-22 10:41:39 +0200 |
---|---|---|
committer | Kristian Lyngstol <kristian@bohemians.org> | 2008-05-22 10:41:39 +0200 |
commit | 2d1719edc6237b9db331b59ff14eef2329005eb4 (patch) | |
tree | 86f91958ab4db1e59a22848c40bb2df49d02367d | |
parent | b6f04764b93d3c046cae94fa1b1f25ec0ed5bf62 (diff) | |
download | mousepoll-2d1719edc6237b9db331b59ff14eef2329005eb4.tar.gz mousepoll-2d1719edc6237b9db331b59ff14eef2329005eb4.tar.bz2 |
Allow removal of mousepoll clients during client handeling
-rw-r--r-- | mousepoll.c | 6 |
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; |