diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-08-15 17:39:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-15 17:39:18 -0400 |
commit | 19d6442f52743d50d10c796d7146f58c251f67fe (patch) | |
tree | 3fb49d748f662ef8132a59798df1854be54ae76a /examples/compositor/wl_compositor.c | |
parent | 27c13d621df7b38d04f8ffb3012aa977d1b9bb24 (diff) | |
parent | dca3f630ddeaa85b90e863cd181f2d27282a9cd3 (diff) |
Merge pull request #91 from martinetd/move_wl_shell
Move wl_shell into wlroots
Diffstat (limited to 'examples/compositor/wl_compositor.c')
-rw-r--r-- | examples/compositor/wl_compositor.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/examples/compositor/wl_compositor.c b/examples/compositor/wl_compositor.c index e25dddac..0bab345d 100644 --- a/examples/compositor/wl_compositor.c +++ b/examples/compositor/wl_compositor.c @@ -7,16 +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; - - struct wl_resource *res = NULL; - wl_list_for_each(res, &state->surfaces, link) { - if (res == surface->resource) { - wl_list_remove(&res->link); - break; - } - } + wl_list_remove(wl_resource_get_link(data)); } static void wl_compositor_create_surface(struct wl_client *client, |