diff options
author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-08-05 12:11:42 -0600 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-08-06 12:03:27 -0600 |
commit | 464dddc110934e80478c6acdd3488bc3b4bac2ad (patch) | |
tree | f07b4317b7660646baf702449dae31d4bd759185 | |
parent | cb01023db65d7f9f511a0c1b90b673ab09a56fe1 (diff) |
fix crash when a virtual pointer is destroyed
Fixes: https://codeberg.org/dwl/dwl/issues/680
(cherry picked from commit a634e3f527001cd2e2b7bc21bb14c1b7351f60bd)
-rw-r--r-- | dwl.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2976,11 +2976,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 * |