diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2015-01-07 15:00:25 -0600 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2015-01-08 10:58:33 +0800 |
commit | fd5ca513f9791dcb689bb19c734e982276488159 (patch) | |
tree | ee1638e569051d7e6f6e95fd378b261a19dfa948 /src | |
parent | 99bfa6479902193b93a865030056ea98c2ee72a7 (diff) | |
download | weston-fd5ca513f9791dcb689bb19c734e982276488159.tar.gz |
input: Add comment explaining why pointer isn't freed when device is removed
When the last pointer is removed from a seat, the pointer struct is
intentionally kept. This has some interesting side effects, so I've
documented it here so people like me don't errantly assume it's a bug.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/input.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/input.c b/src/input.c index d3bfa5ea..c039af0f 100644 --- a/src/input.c +++ b/src/input.c @@ -2226,6 +2226,11 @@ weston_seat_release_pointer(struct weston_seat *seat) weston_pointer_reset_state(pointer); seat_send_updated_caps(seat); + + /* seat->pointer is intentionally not destroyed so that + * a newly attached pointer on this seat will retain + * the previous cursor co-ordinates. + */ } } |