aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-06-21 16:25:18 -0500
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-06-21 16:25:18 -0500
commit461d02d3e03a5f0dc42fbb71dd8ab728b9c7e424 (patch)
treefc01d4b56298a1f7cf171009f44c1f06a24b6f2f
parenta32db11f16fae3f57af3795d2463996b95e7ba1c (diff)
chase wlroots input_device changes
-rw-r--r--dwl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/dwl.c b/dwl.c
index b56abd7..beab572 100644
--- a/dwl.c
+++ b/dwl.c
@@ -575,8 +575,7 @@ cleanup(void)
void
cleanupkeyboard(struct wl_listener *listener, void *data)
{
- struct wlr_input_device *device = data;
- Keyboard *kb = device->keyboard->data;
+ Keyboard *kb = wlr_keyboard_from_input_device(data)->data;
wl_list_remove(&kb->link);
wl_list_remove(&kb->modifiers.link);
@@ -1118,10 +1117,10 @@ inputdevice(struct wl_listener *listener, void *data)
switch (device->type) {
case WLR_INPUT_DEVICE_KEYBOARD:
- createkeyboard(device->keyboard);
+ createkeyboard(wlr_keyboard_from_input_device(device));
break;
case WLR_INPUT_DEVICE_POINTER:
- createpointer(device->pointer);
+ createpointer(wlr_pointer_from_input_device(device));
break;
default:
/* TODO handle other input device types */
@@ -2230,8 +2229,7 @@ void
virtualkeyboard(struct wl_listener *listener, void *data)
{
struct wlr_virtual_keyboard_v1 *keyboard = data;
- struct wlr_input_device *device = &keyboard->keyboard.base;
- createkeyboard(device->keyboard);
+ createkeyboard(&keyboard->keyboard);
}
Monitor *