aboutsummaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@proton.me>2024-08-05 12:11:42 -0600
committerLeonardo Hernández Hernández <leohdz172@proton.me>2024-08-06 12:01:22 -0600
commita634e3f527001cd2e2b7bc21bb14c1b7351f60bd (patch)
tree2a5634a7104a59f346cf9110336599b59a2de728 /dwl.c
parentd136dadf456250f9a4cef23abd1fdf21518a31ba (diff)
downloaddwl-a634e3f527001cd2e2b7bc21bb14c1b7351f60bd.tar.gz
fix crash when a virtual pointer is destroyed
Fixes: https://codeberg.org/dwl/dwl/issues/680
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dwl.c b/dwl.c
index ac9c36b..8e0d28b 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2977,11 +2977,11 @@ void
virtualpointer(struct wl_listener *listener, void *data)
{
struct wlr_virtual_pointer_v1_new_pointer_event *event = data;
- struct wlr_pointer pointer = event->new_pointer->pointer;
+ struct wlr_input_device *device = &event->new_pointer->pointer.base;
- wlr_cursor_attach_input_device(cursor, &pointer.base);
+ wlr_cursor_attach_input_device(cursor, device);
if (event->suggested_output)
- wlr_cursor_map_input_to_output(cursor, &pointer.base, event->suggested_output);
+ wlr_cursor_map_input_to_output(cursor, device, event->suggested_output);
}
Monitor *