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:
@@ -4330,7 +4330,7 @@ bind_output(struct wl_client *client,
|
||||
}
|
||||
|
||||
wl_list_insert(&head->resource_list, wl_resource_get_link(resource));
|
||||
wl_resource_set_implementation(resource, &output_interface, output,
|
||||
wl_resource_set_implementation(resource, &output_interface, head,
|
||||
unbind_resource);
|
||||
|
||||
assert(output);
|
||||
@@ -4364,8 +4364,8 @@ bind_output(struct wl_client *client,
|
||||
* \return The backing object (user data) of a wl_resource representing a
|
||||
* wl_output protocol object.
|
||||
*/
|
||||
WL_EXPORT struct weston_output *
|
||||
weston_output_from_resource(struct wl_resource *resource)
|
||||
WL_EXPORT struct weston_head *
|
||||
weston_head_from_resource(struct wl_resource *resource)
|
||||
{
|
||||
assert(wl_resource_instance_of(resource, &wl_output_interface,
|
||||
&output_interface));
|
||||
|
||||
@@ -1995,8 +1995,8 @@ weston_output_disable(struct weston_output *output);
|
||||
void
|
||||
weston_pending_output_coldplug(struct weston_compositor *compositor);
|
||||
|
||||
struct weston_output *
|
||||
weston_output_from_resource(struct wl_resource *resource);
|
||||
struct weston_head *
|
||||
weston_head_from_resource(struct wl_resource *resource);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user