mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
backend/x11: destroy buffers when destroying output
This commit is contained in:
parent
d6dbdd97e9
commit
55b02f753f
1 changed files with 7 additions and 0 deletions
|
@ -82,6 +82,8 @@ static bool output_set_custom_mode(struct wlr_output *wlr_output,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void destroy_x11_buffer(struct wlr_x11_buffer *buffer);
|
||||||
|
|
||||||
static void output_destroy(struct wlr_output *wlr_output) {
|
static void output_destroy(struct wlr_output *wlr_output) {
|
||||||
struct wlr_x11_output *output = get_x11_output_from_output(wlr_output);
|
struct wlr_x11_output *output = get_x11_output_from_output(wlr_output);
|
||||||
struct wlr_x11_backend *x11 = output->x11;
|
struct wlr_x11_backend *x11 = output->x11;
|
||||||
|
@ -89,6 +91,11 @@ static void output_destroy(struct wlr_output *wlr_output) {
|
||||||
wlr_input_device_destroy(&output->pointer_dev);
|
wlr_input_device_destroy(&output->pointer_dev);
|
||||||
wlr_input_device_destroy(&output->touch_dev);
|
wlr_input_device_destroy(&output->touch_dev);
|
||||||
|
|
||||||
|
struct wlr_x11_buffer *buffer, *buffer_tmp;
|
||||||
|
wl_list_for_each_safe(buffer, buffer_tmp, &output->buffers, link) {
|
||||||
|
destroy_x11_buffer(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
wl_list_remove(&output->link);
|
wl_list_remove(&output->link);
|
||||||
wl_event_source_remove(output->frame_timer);
|
wl_event_source_remove(output->frame_timer);
|
||||||
wlr_buffer_unlock(output->back_buffer);
|
wlr_buffer_unlock(output->back_buffer);
|
||||||
|
|
Loading…
Reference in a new issue