mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-07 19:49:53 -05:00
remove all keyboard listeners on destroy
This commit is contained in:
parent
13a91c15f0
commit
cb947c15e3
1 changed files with 1 additions and 4 deletions
|
|
@ -17,8 +17,6 @@ wlr_keyboard: *wlr.Keyboard,
|
|||
context: *xkb.Context,
|
||||
device: *wlr.InputDevice,
|
||||
|
||||
link: wl.list.Link = undefined,
|
||||
|
||||
// Keyboard listeners
|
||||
key: wl.Listener(*wlr.Keyboard.event.Key) = .init(handleKey),
|
||||
key_map: wl.Listener(*wlr.Keyboard) = .init(handleKeyMap),
|
||||
|
|
@ -106,10 +104,9 @@ pub fn handleDestroy(listener: *wl.Listener(*wlr.InputDevice), _: *wlr.InputDevi
|
|||
|
||||
std.log.debug("removing keyboard: {s}", .{keyboard.device.name orelse "(null)"});
|
||||
|
||||
keyboard.link.remove();
|
||||
|
||||
keyboard.modifiers.link.remove();
|
||||
keyboard.key.link.remove();
|
||||
keyboard.key_map.link.remove();
|
||||
keyboard.destroy.link.remove();
|
||||
|
||||
gpa.destroy(keyboard);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue