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:
@@ -270,11 +270,13 @@ input_panel_surface_set_toplevel(struct wl_client *client,
|
||||
struct input_panel_surface *input_panel_surface =
|
||||
wl_resource_get_user_data(resource);
|
||||
struct desktop_shell *shell = input_panel_surface->shell;
|
||||
struct weston_head *head;
|
||||
|
||||
wl_list_insert(&shell->input_panel.surfaces,
|
||||
&input_panel_surface->link);
|
||||
|
||||
input_panel_surface->output = weston_output_from_resource(output_resource);
|
||||
head = weston_head_from_resource(output_resource);
|
||||
input_panel_surface->output = head->output;
|
||||
input_panel_surface->panel = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -2969,7 +2969,7 @@ desktop_shell_set_background(struct wl_client *client,
|
||||
surface->committed = background_committed;
|
||||
surface->committed_private = shell;
|
||||
weston_surface_set_label_func(surface, background_get_label);
|
||||
surface->output = weston_output_from_resource(output_resource);
|
||||
surface->output = weston_head_from_resource(output_resource)->output;
|
||||
view->output = surface->output;
|
||||
|
||||
sh_output = find_shell_output_from_weston_output(shell, surface->output);
|
||||
@@ -3066,7 +3066,7 @@ desktop_shell_set_panel(struct wl_client *client,
|
||||
surface->committed = panel_committed;
|
||||
surface->committed_private = shell;
|
||||
weston_surface_set_label_func(surface, panel_get_label);
|
||||
surface->output = weston_output_from_resource(output_resource);
|
||||
surface->output = weston_head_from_resource(output_resource)->output;
|
||||
view->output = surface->output;
|
||||
|
||||
sh_output = find_shell_output_from_weston_output(shell, surface->output);
|
||||
|
||||
Reference in New Issue
Block a user