summaryrefslogtreecommitdiff
path: root/fullscreen-shell
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2017-03-27 15:14:32 +0300
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2017-07-25 16:08:48 +0300
commit9ffb25009cbf2996f53b4ceb39cb9a7af1508ebf (patch)
treeee1e06386af507ad0008ed91524639a0059e6da7 /fullscreen-shell
parent0079a949e09816a7ae1ea0de69196c2a0e0875e7 (diff)
downloadweston-9ffb25009cbf2996f53b4ceb39cb9a7af1508ebf.tar.gz
libweston: introduce weston_output_from_resource()
This is a simple wrapper for casting the user data of a wl_resource into a struct weston_output pointer. Using the wrapper clearly marks all the places where a wl_output protocol object is used. Replace ALL wl_output related calls to wl_resource_get_user_data() with a call to weston_output_from_resource(). v2: add type assert in weston_output_from_resource(). Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
Diffstat (limited to 'fullscreen-shell')
-rw-r--r--fullscreen-shell/fullscreen-shell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fullscreen-shell/fullscreen-shell.c b/fullscreen-shell/fullscreen-shell.c
index 7368cb42..6f4565a7 100644
--- a/fullscreen-shell/fullscreen-shell.c
+++ b/fullscreen-shell/fullscreen-shell.c
@@ -769,7 +769,7 @@ fullscreen_shell_present_surface(struct wl_client *client,
}
if (output_res) {
- output = wl_resource_get_user_data(output_res);
+ output = weston_output_from_resource(output_res);
fsout = fs_output_for_output(output);
fs_output_set_surface(fsout, surface, method, 0, 0);
} else {
@@ -813,7 +813,7 @@ fullscreen_shell_present_surface_for_mode(struct wl_client *client,
struct weston_seat *seat;
struct fs_output *fsout;
- output = wl_resource_get_user_data(output_res);
+ output = weston_output_from_resource(output_res);
fsout = fs_output_for_output(output);
if (surface_res == NULL) {