search: use wayl_win_subsurface_new/destroy()

This commit is contained in:
Daniel Eklöf 2021-02-12 11:47:49 +01:00
parent 587f04f2e1
commit e049124f6d
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 20 additions and 34 deletions

View file

@ -1415,9 +1415,9 @@ wayl_win_destroy(struct wl_window *win)
}
/* Scrollback search */
if (win->search_surface != NULL) {
wl_surface_attach(win->search_surface, NULL, 0, 0);
wl_surface_commit(win->search_surface);
if (win->search_surface.surf != NULL) {
wl_surface_attach(win->search_surface.surf, NULL, 0, 0);
wl_surface_commit(win->search_surface.surf);
}
/* CSD */
@ -1443,6 +1443,8 @@ wayl_win_destroy(struct wl_window *win)
}
csd_destroy(win);
wayl_win_subsurface_destroy(&win->search_surface);
if (win->render_timer_sub_surface != NULL)
wl_subsurface_destroy(win->render_timer_sub_surface);
if (win->render_timer_surface != NULL)
@ -1451,10 +1453,6 @@ wayl_win_destroy(struct wl_window *win)
wl_subsurface_destroy(win->scrollback_indicator_sub_surface);
if (win->scrollback_indicator_surface != NULL)
wl_surface_destroy(win->scrollback_indicator_surface);
if (win->search_sub_surface != NULL)
wl_subsurface_destroy(win->search_sub_surface);
if (win->search_surface != NULL)
wl_surface_destroy(win->search_surface);
if (win->frame_callback != NULL)
wl_callback_destroy(win->frame_callback);
if (win->xdg_toplevel_decoration != NULL)