diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/headless/input_device.c | 6 | ||||
-rw-r--r-- | backend/libinput/events.c | 4 | ||||
-rw-r--r-- | backend/libinput/switch.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/backend/headless/input_device.c b/backend/headless/input_device.c index 827c6ee4..76e69c52 100644 --- a/backend/headless/input_device.c +++ b/backend/headless/input_device.c @@ -78,12 +78,12 @@ struct wlr_input_device *wlr_headless_add_input_device( wlr_tablet_pad_init(wlr_device->tablet_pad, NULL); break; case WLR_INPUT_DEVICE_SWITCH: - wlr_device->lid_switch = calloc(1, sizeof(struct wlr_switch)); - if (wlr_device->lid_switch == NULL) { + wlr_device->switch_device = calloc(1, sizeof(struct wlr_switch)); + if (wlr_device->switch_device == NULL) { wlr_log(WLR_ERROR, "Unable to allocate wlr_switch"); goto error; } - wlr_switch_init(wlr_device->lid_switch, NULL); + wlr_switch_init(wlr_device->switch_device, NULL); } wl_list_insert(&backend->input_devices, &wlr_device->link); diff --git a/backend/libinput/events.c b/backend/libinput/events.c index 93f8c527..19c66f38 100644 --- a/backend/libinput/events.c +++ b/backend/libinput/events.c @@ -174,8 +174,8 @@ static void handle_device_added(struct wlr_libinput_backend *backend, if (!wlr_dev) { goto fail; } - wlr_dev->lid_switch = create_libinput_switch(libinput_dev); - if (!wlr_dev->lid_switch) { + wlr_dev->switch_device = create_libinput_switch(libinput_dev); + if (!wlr_dev->switch_device) { free(wlr_dev); goto fail; } diff --git a/backend/libinput/switch.c b/backend/libinput/switch.c index 393460b0..a9c33d3a 100644 --- a/backend/libinput/switch.c +++ b/backend/libinput/switch.c @@ -29,7 +29,7 @@ void handle_switch_toggle(struct libinput_event *event, wlr_log(WLR_DEBUG, "Got a switch event for a device with no switch?"); return; } - struct libinput_event_switch *sevent = + struct libinput_event_switch *sevent = libinput_event_get_switch_event (event); struct wlr_event_switch_toggle wlr_event = { 0 }; wlr_event.device = wlr_dev; @@ -51,5 +51,5 @@ void handle_switch_toggle(struct libinput_event *event, } wlr_event.time_msec = usec_to_msec(libinput_event_switch_get_time_usec(sevent)); - wlr_signal_emit_safe(&wlr_dev->lid_switch->events.toggle, &wlr_event); + wlr_signal_emit_safe(&wlr_dev->switch_device->events.toggle, &wlr_event); } |