diff options
author | Simon Ser <contact@emersion.fr> | 2022-06-21 23:10:38 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-06-22 12:44:15 -0400 |
commit | 122d8ce95484bd097bf3a15b8191213bd6969b41 (patch) | |
tree | b97bb88c4bf7b566747bed4cce84f51842cd21a5 /sway/input/seat.c | |
parent | 49cef51e6e7fe31ba4f820560e0b69ebd2149d37 (diff) |
Remove access to wlr_input_device union
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3626
Closes: https://github.com/swaywm/sway/issues/7077
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index fe61e0fe..b21e1b86 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -142,7 +142,7 @@ static struct sway_keyboard *sway_keyboard_for_wlr_keyboard( if (input_device->wlr_device->type != WLR_INPUT_DEVICE_KEYBOARD) { continue; } - if (input_device->wlr_device->keyboard == wlr_keyboard) { + if (input_device->wlr_device == &wlr_keyboard->base) { return seat_device->keyboard; } } @@ -150,7 +150,7 @@ static struct sway_keyboard *sway_keyboard_for_wlr_keyboard( wl_list_for_each(group, &seat->keyboard_groups, link) { struct sway_input_device *input_device = group->seat_device->input_device; - if (input_device->wlr_device->keyboard == wlr_keyboard) { + if (input_device->wlr_device == &wlr_keyboard->base) { return group->seat_device->keyboard; } } @@ -745,10 +745,10 @@ static void seat_apply_input_config(struct sway_seat *seat, struct wlr_input_device *dev = sway_device->input_device->wlr_device; switch (dev->type) { case WLR_INPUT_DEVICE_POINTER: - mapped_to_output = dev->pointer->output_name; + mapped_to_output = wlr_pointer_from_input_device(dev)->output_name; break; case WLR_INPUT_DEVICE_TOUCH: - mapped_to_output = dev->touch->output_name; + mapped_to_output = wlr_touch_from_input_device(dev)->output_name; break; default: mapped_to_output = NULL; @@ -822,7 +822,7 @@ static void seat_configure_keyboard(struct sway_seat *seat, } sway_keyboard_configure(seat_device->keyboard); wlr_seat_set_keyboard(seat->wlr_seat, - seat_device->input_device->wlr_device->keyboard); + wlr_keyboard_from_input_device(seat_device->input_device->wlr_device)); // force notify reenter to pick up the new configuration. This reuses // the current focused surface to avoid breaking input grabs. |