libweston: make wl_output point to weston_head

The user data of a wl_resource representing a wl_output protocol object
used to be a pointer to weston_output. Now that weston_output is being
split, wl_output more accurately refers to weston_head which is a single
monitor.

Change the wl_output user data to point to weston_head.
weston_output_from_resource() is replaced with
weston_head_from_resource().

This change is not strictly necessary, but architecturally it is the
right thing to do. In the future there might appear the need to refer to
a specific head of a cloned pair, for instance.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
v5 Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Ian Ray <ian.ray@ge.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
Pekka Paalanen
2017-03-27 16:31:25 +03:00
parent 0534762b21
commit 055c1137ae
10 changed files with 19 additions and 15 deletions
+2 -2
View File
@@ -769,7 +769,7 @@ fullscreen_shell_present_surface(struct wl_client *client,
}
if (output_res) {
output = weston_output_from_resource(output_res);
output = weston_head_from_resource(output_res)->output;
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 = weston_output_from_resource(output_res);
output = weston_head_from_resource(output_res)->output;
fsout = fs_output_for_output(output);
if (surface_res == NULL) {