Clean up input managers and input backends separately
When inputs are disabled, managers may exist while backends don't.pull/131/head
parent
e9e7c1a33f
commit
ce183e82e5
16
src/main.c
16
src/main.c
|
@ -283,16 +283,20 @@ void wayvnc_destroy(struct wayvnc* self)
|
|||
|
||||
wl_shm_destroy(wl_shm);
|
||||
|
||||
if (self->keyboard_manager) {
|
||||
zwp_virtual_keyboard_v1_destroy(self->keyboard_backend.virtual_keyboard);
|
||||
zwp_virtual_keyboard_manager_v1_destroy(self->keyboard_manager);
|
||||
if (self->keyboard_backend.virtual_keyboard) {
|
||||
zwp_virtual_keyboard_v1_destroy(
|
||||
self->keyboard_backend.virtual_keyboard);
|
||||
keyboard_destroy(&self->keyboard_backend);
|
||||
}
|
||||
|
||||
if (self->pointer_manager) {
|
||||
zwlr_virtual_pointer_manager_v1_destroy(self->pointer_manager);
|
||||
if (self->keyboard_manager)
|
||||
zwp_virtual_keyboard_manager_v1_destroy(self->keyboard_manager);
|
||||
|
||||
if (self->pointer_backend.pointer)
|
||||
pointer_destroy(&self->pointer_backend);
|
||||
}
|
||||
|
||||
if (self->pointer_manager)
|
||||
zwlr_virtual_pointer_manager_v1_destroy(self->pointer_manager);
|
||||
|
||||
if (self->screencopy.manager)
|
||||
zwlr_screencopy_manager_v1_destroy(self->screencopy.manager);
|
||||
|
|
Loading…
Reference in New Issue