diff options
author | emersion <contact@emersion.fr> | 2018-02-13 23:48:46 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-02-13 23:48:46 +0100 |
commit | 392d54a35d34ff08baaffdd50b9d11072481706e (patch) | |
tree | 22ae4924ab5486ee97c22f0ce0a15a1cf853e043 /xwayland | |
parent | 71cba94e73022d8cef8651055204a4706377ae11 (diff) | |
download | wlroots-392d54a35d34ff08baaffdd50b9d11072481706e.tar.xz |
Wrap wl_resource_get_user_data into safer helper functions
This ensures we're not incorrectly casting a resource.
Fixes #628
Diffstat (limited to 'xwayland')
-rw-r--r-- | xwayland/xwm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 10bc2e30..94dfdaab 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -742,7 +742,7 @@ static void xwm_handle_surface_id_message(struct wlr_xwm *xwm, struct wl_resource *resource = wl_client_get_object(xwm->xwayland->client, id); if (resource) { - struct wlr_surface *surface = wl_resource_get_user_data(resource); + struct wlr_surface *surface = wlr_surface_from_resource(resource); xsurface->surface_id = 0; xwm_map_shell_surface(xwm, xsurface, surface); } else { |