aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-09-28 01:10:39 +0200
committeremersion <contact@emersion.fr>2017-09-28 01:10:39 +0200
commiteaa414bbd8b33ae79aed8c41e3198a0bc75ff0fe (patch)
tree0b2580fdd4e67a2b7898f2f4afe7bc13156288ac
parentd41a4a0baeb268515044857d8121c033f3c0b477 (diff)
wl_shell: properly set wl_surface->resource
-rw-r--r--types/wlr_wl_shell.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/types/wlr_wl_shell.c b/types/wlr_wl_shell.c
index 6f941bda..5040850f 100644
--- a/types/wlr_wl_shell.c
+++ b/types/wlr_wl_shell.c
@@ -306,13 +306,12 @@ static void wl_shell_get_shell_surface(struct wl_client *client,
wl_surface->shell = wl_shell;
wl_surface->client = client;
- wl_surface->resource = surface_resource;
wl_surface->surface = surface;
- struct wl_resource *shell_surface_resource = wl_resource_create(client,
- &wl_shell_surface_interface, wl_resource_get_version(resource), id);
- wlr_log(L_DEBUG, "New wl_shell %p (res %p)", wl_surface, shell_surface_resource);
- wl_resource_set_implementation(shell_surface_resource,
+ wl_surface->resource = wl_resource_create(client, &wl_shell_surface_interface,
+ wl_resource_get_version(resource), id);
+ wlr_log(L_DEBUG, "new wl_shell %p (res %p)", wl_surface, wl_surface->resource);
+ wl_resource_set_implementation(wl_surface->resource,
&shell_surface_interface, wl_surface, destroy_shell_surface);
wl_signal_init(&wl_surface->events.destroy);