mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 22:55:58 +01:00
Merge pull request #545 from emersion/fix-output-destroy
Free fullscreen surface and cursors when destroying output
This commit is contained in:
commit
d438a877fd
2 changed files with 7 additions and 1 deletions
|
@ -55,7 +55,7 @@ struct wlr_output {
|
|||
|
||||
float transform_matrix[16];
|
||||
|
||||
/* Note: some backends may have zero modes */
|
||||
// Note: some backends may have zero modes
|
||||
struct wl_list modes;
|
||||
struct wlr_output_mode *current_mode;
|
||||
|
||||
|
|
|
@ -272,6 +272,7 @@ void wlr_output_destroy(struct wlr_output *output) {
|
|||
}
|
||||
|
||||
wlr_output_destroy_global(output);
|
||||
wlr_output_set_fullscreen_surface(output, NULL);
|
||||
|
||||
wl_signal_emit(&output->events.destroy, output);
|
||||
|
||||
|
@ -281,6 +282,11 @@ void wlr_output_destroy(struct wlr_output *output) {
|
|||
free(mode);
|
||||
}
|
||||
|
||||
struct wlr_output_cursor *cursor, *tmp_cursor;
|
||||
wl_list_for_each_safe(cursor, tmp_cursor, &output->cursors, link) {
|
||||
wlr_output_cursor_destroy(cursor);
|
||||
}
|
||||
|
||||
if (output->impl && output->impl->destroy) {
|
||||
output->impl->destroy(output);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue