fix: miss free switch toggle listener when switch VT

This commit is contained in:
DreamMaoMao 2025-09-06 09:37:40 +08:00
parent 0d83025f51
commit 73cd62cc6b
2 changed files with 61 additions and 35 deletions

View file

@ -2780,9 +2780,14 @@ void reapply_keyboard(void) {
}
void reapply_pointer(void) {
struct input_device *id;
InputDevice *id;
struct libinput_device *device;
wl_list_for_each(id, &pointers, link) {
wl_list_for_each(id, &inputdevices, link) {
if (id->wlr_device->type != WLR_INPUT_DEVICE_POINTER) {
continue;
}
device = id->libinput_device;
if (wlr_input_device_is_libinput(id->wlr_device) && device) {
configure_pointer(device);