Skip to content

Commit

Permalink
fix hyprland crashes when creating a surface multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
mojyack authored and proycon committed Nov 3, 2023
1 parent c457d69 commit 2d01b89
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,15 @@ hide()
return;
}

if(wfs_draw_surf) {
wp_fractional_scale_v1_destroy(wfs_draw_surf);
wfs_draw_surf = NULL;
}
if(draw_surf_viewport) {
wp_viewport_destroy(draw_surf_viewport);
draw_surf_viewport = NULL;
}

zwlr_layer_surface_v1_destroy(layer_surface);
wl_surface_destroy(draw_surf.surf);
layer_surface = NULL;
Expand Down

0 comments on commit 2d01b89

Please sign in to comment.