mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
Make touch depend on cursor to prevent racing
This commit is contained in:
parent
8d0812d45a
commit
5e1562fae6
5 changed files with 18 additions and 14 deletions
11
src/seat.c
11
src/seat.c
|
|
@ -417,9 +417,8 @@ seat_init(struct server *server)
|
|||
}
|
||||
wlr_cursor_attach_output_layout(seat->cursor, server->output_layout);
|
||||
|
||||
keyboard_init(seat);
|
||||
cursor_init(seat);
|
||||
touch_init(seat);
|
||||
keyboard_init(seat);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -434,14 +433,8 @@ seat_finish(struct server *server)
|
|||
input_device_destroy(&input->destroy, NULL);
|
||||
}
|
||||
|
||||
keyboard_finish(seat);
|
||||
/*
|
||||
* Caution - touch_finish() unregisters event listeners from
|
||||
* seat->cursor and must come before cursor_finish(), otherwise
|
||||
* a use-after-free occurs.
|
||||
*/
|
||||
touch_finish(seat);
|
||||
cursor_finish(seat);
|
||||
keyboard_finish(seat);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue