mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
input: remove tablet/pad signal listeners on destroy
We should remove those when destroying a tablet or a tablet pad. Also rename 'tablet' to 'pad' in 'tablet_pad' for better readability and consistency.
This commit is contained in:
parent
b6e439a5cc
commit
163f11595f
2 changed files with 17 additions and 9 deletions
|
|
@ -124,6 +124,11 @@ handle_destroy(struct wl_listener *listener, void *data)
|
|||
{
|
||||
struct drawing_tablet *tablet =
|
||||
wl_container_of(listener, tablet, handlers.destroy);
|
||||
|
||||
wl_list_remove(&tablet->handlers.tip.link);
|
||||
wl_list_remove(&tablet->handlers.button.link);
|
||||
wl_list_remove(&tablet->handlers.axis.link);
|
||||
wl_list_remove(&tablet->handlers.destroy.link);
|
||||
free(tablet);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue