mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-06 13:29:45 -05:00
wl_shell/compositor surface: do not check if it's in list before removing
This commit is contained in:
parent
5dae8e1be8
commit
d49edc8243
2 changed files with 2 additions and 20 deletions
|
|
@ -7,17 +7,7 @@
|
|||
#include "compositor.h"
|
||||
|
||||
static void destroy_surface_listener(struct wl_listener *listener, void *data) {
|
||||
struct wlr_surface *surface = wl_resource_get_user_data(data);
|
||||
struct wl_compositor_state *state = surface->compositor_data;
|
||||
assert(data == surface->resource);
|
||||
|
||||
struct wl_resource *res = NULL;
|
||||
wl_list_for_each(res, &state->surfaces, link) {
|
||||
if (res == surface->resource) {
|
||||
wl_list_remove(wl_resource_get_link(res));
|
||||
break;
|
||||
}
|
||||
}
|
||||
wl_list_remove(wl_resource_get_link(data));
|
||||
}
|
||||
|
||||
static void wl_compositor_create_surface(struct wl_client *client,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue