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>
dev
Derek Foreman 10 years ago committed by Jonas Ådahl
parent 99bfa64799
commit fd5ca513f9
  1. 5
      src/input.c

@ -2226,6 +2226,11 @@ weston_seat_release_pointer(struct weston_seat *seat)
weston_pointer_reset_state(pointer); weston_pointer_reset_state(pointer);
seat_send_updated_caps(seat); 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.
*/
} }
} }

Loading…
Cancel
Save