Skip to content

Commit

Permalink
fix crash when a virtual pointer is destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
sevz17 committed Aug 6, 2024
1 parent d136dad commit a634e3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dwl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down

0 comments on commit a634e3f

Please sign in to comment.