mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-03 17:55:59 +01:00
Merge pull request #376 from martinetd/rootston_exit
Fix rootston exit segfaults
This commit is contained in:
commit
697a24137b
4 changed files with 8 additions and 6 deletions
|
@ -29,8 +29,8 @@ static void wlr_drm_backend_destroy(struct wlr_backend *backend) {
|
||||||
|
|
||||||
wlr_drm_restore_outputs(drm);
|
wlr_drm_restore_outputs(drm);
|
||||||
|
|
||||||
struct wlr_drm_connector *conn;
|
struct wlr_drm_connector *conn, *next;
|
||||||
wl_list_for_each(conn, &drm->outputs, link) {
|
wl_list_for_each_safe(conn, next, &drm->outputs, link) {
|
||||||
wlr_output_destroy(&conn->output);
|
wlr_output_destroy(&conn->output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -645,6 +645,7 @@ static void wlr_drm_connector_destroy(struct wlr_output *output) {
|
||||||
struct wlr_drm_connector *conn = (struct wlr_drm_connector *)output;
|
struct wlr_drm_connector *conn = (struct wlr_drm_connector *)output;
|
||||||
wlr_drm_connector_cleanup(conn);
|
wlr_drm_connector_cleanup(conn);
|
||||||
wl_event_source_remove(conn->retry_pageflip);
|
wl_event_source_remove(conn->retry_pageflip);
|
||||||
|
wl_list_remove(&conn->link);
|
||||||
free(conn);
|
free(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -823,6 +824,7 @@ void wlr_drm_scan_connectors(struct wlr_drm_backend *drm) {
|
||||||
|
|
||||||
drmModeFreeCrtc(conn->old_crtc);
|
drmModeFreeCrtc(conn->old_crtc);
|
||||||
wl_event_source_remove(conn->retry_pageflip);
|
wl_event_source_remove(conn->retry_pageflip);
|
||||||
|
wl_list_remove(&conn->link);
|
||||||
free(conn);
|
free(conn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,13 +99,12 @@ static void wlr_libinput_backend_destroy(struct wlr_backend *_backend) {
|
||||||
}
|
}
|
||||||
struct wlr_libinput_backend *backend = (struct wlr_libinput_backend *)_backend;
|
struct wlr_libinput_backend *backend = (struct wlr_libinput_backend *)_backend;
|
||||||
for (size_t i = 0; i < backend->wlr_device_lists->length; i++) {
|
for (size_t i = 0; i < backend->wlr_device_lists->length; i++) {
|
||||||
struct wlr_list *wlr_devices = backend->wlr_device_lists->items[i];
|
struct wl_list *wlr_devices = backend->wlr_device_lists->items[i];
|
||||||
for (size_t j = 0; j < wlr_devices->length; j++) {
|
struct wlr_input_device *wlr_dev, *next;
|
||||||
struct wlr_input_device *wlr_dev = wlr_devices->items[j];
|
wl_list_for_each_safe(wlr_dev, next, wlr_devices, link) {
|
||||||
wl_signal_emit(&backend->backend.events.input_remove, wlr_dev);
|
wl_signal_emit(&backend->backend.events.input_remove, wlr_dev);
|
||||||
wlr_input_device_destroy(wlr_dev);
|
wlr_input_device_destroy(wlr_dev);
|
||||||
}
|
}
|
||||||
wlr_list_free(wlr_devices);
|
|
||||||
}
|
}
|
||||||
wlr_list_free(backend->wlr_device_lists);
|
wlr_list_free(backend->wlr_device_lists);
|
||||||
wl_event_source_remove(backend->input_event);
|
wl_event_source_remove(backend->input_event);
|
||||||
|
|
|
@ -26,6 +26,7 @@ struct wlr_input_device *get_appropriate_device(
|
||||||
static void wlr_libinput_device_destroy(struct wlr_input_device *_dev) {
|
static void wlr_libinput_device_destroy(struct wlr_input_device *_dev) {
|
||||||
struct wlr_libinput_input_device *dev = (struct wlr_libinput_input_device *)_dev;
|
struct wlr_libinput_input_device *dev = (struct wlr_libinput_input_device *)_dev;
|
||||||
libinput_device_unref(dev->handle);
|
libinput_device_unref(dev->handle);
|
||||||
|
wl_list_remove(&dev->wlr_input_device.link);
|
||||||
free(dev);
|
free(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue