Skip to content
Myr

wayland: use wl_*_release() instead of wl_*_destroy()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This lets the compositor free up internal state.

authored by Daniel Eklöf · committed by Daniel Eklöf · parent 90d4a74 · Browse files · 1 file+7 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−5 removed

  • other:+7 added−5 removed

1 file+7 added−5 removed

modified:wayland.c+7 added-5 removed
230 unmodified lines
231 xkb_context_unref(seat->kbd.xkb);232 if (seat->kbd.repeat.fd > 0)233 fdm_del(seat->wayl->fdm, seat->kbd.repeat.fd);234 if (seat->wl_keyboard != NULL)235 wl_keyboard_destroy(seat->wl_keyboard);235 wl_keyboard_release(seat->wl_keyboard);236237 if (seat->pointer.theme != NULL)238 wl_cursor_theme_destroy(seat->pointer.theme);239 if (seat->pointer.surface != NULL)240 wl_surface_destroy(seat->pointer.surface);241 if (seat->wl_pointer != NULL)242 wl_pointer_destroy(seat->wl_pointer);242 wl_pointer_release(seat->wl_pointer);243244 if (seat->wl_seat != NULL)245 wl_seat_destroy(seat->wl_seat);245 wl_seat_release(seat->wl_seat);246247 free(seat->name);248}249
918 unmodified lines
1168{1169 if (mon->xdg != NULL)1170 zxdg_output_v1_destroy(mon->xdg);1171 if (mon->output != NULL)1172 wl_output_destroy(mon->output);1172 wl_output_release(mon->output);1173 free(mon->name);1174 free(mon->make);1175 free(mon->model);1176 free(mon->description);
365 unmodified lines
1542 if (wayl->shm != NULL)1543 wl_shm_destroy(wayl->shm);1544 if (wayl->registry != NULL)1545 wl_registry_destroy(wayl->registry);1546 if (wayl->display != NULL)1546 if (wayl->display != NULL) {1547 wayl_flush(wayl);1548 wl_display_disconnect(wayl->display);1549 }15501551 free(wayl->output_name);1552 free(wayl->font_name);1553 free(wayl);
19 unmodified lines