Fix crash when killing WM with windows active
In commit 75308a04, I added an assertion to Output.destroy() to verify
that all of its windows had been removed already. The issue is, that
only happened when Output received a .removed event, but that never
came when killing the WM directly. Instead, I simplified the handling
for the .removed event and moved most of that into destroy().
I also changed where structs have their wl_list.link removed (to inside
of their destroys) to make it more consistent. Finally,
XkbBinding.sendWindowToOutput asserts that the current output is actually
focused. Users *should* never have a focused window if there's not also
a focused output.
This commit is contained in:
parent
92f79b3b72
commit
e862aca887
7 changed files with 56 additions and 72 deletions
|
|
@ -42,8 +42,8 @@ const Keyboard = struct {
|
|||
}
|
||||
|
||||
fn destroy(keyboard: *Keyboard) void {
|
||||
keyboard.link.remove();
|
||||
keyboard.xkb_keyboard_v1.destroy();
|
||||
keyboard.link.remove();
|
||||
utils.gpa.destroy(keyboard);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue