mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
s/lid_switch/switch_device
Rename lid_switch to switch_device to disambiguate lid and tablet mode switches.
This commit is contained in:
parent
6b7f5e4010
commit
4453757fc9
10 changed files with 45 additions and 45 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue