mirror of
https://github.com/swaywm/sway.git
synced 2025-11-15 06:59:50 -05:00
config reload: destroy old seat when removed from config
This adds new sway_seat_destroy and sway_cursor_destroy helpers and compare new and old config on free
This commit is contained in:
parent
869be4378d
commit
5766f426aa
7 changed files with 45 additions and 1 deletions
|
|
@ -149,6 +149,16 @@ static void handle_request_set_cursor(struct wl_listener *listener,
|
|||
wlr_log(L_DEBUG, "TODO: handle request set cursor event: %p", event);
|
||||
}
|
||||
|
||||
void sway_cursor_destroy(struct sway_cursor *cursor) {
|
||||
if (!cursor) {
|
||||
return;
|
||||
}
|
||||
|
||||
wlr_xcursor_manager_destroy(cursor->xcursor_manager);
|
||||
wlr_cursor_destroy(cursor->cursor);
|
||||
free(cursor);
|
||||
}
|
||||
|
||||
struct sway_cursor *sway_cursor_create(struct sway_seat *seat) {
|
||||
struct sway_cursor *cursor = calloc(1, sizeof(struct sway_cursor));
|
||||
if (!sway_assert(cursor, "could not allocate sway cursor")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue