libweston: Reconsider view primary output on output power change
When an output power state changes, it may become or no longer be the best primary output for a view. Fixes #819 Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
d3fa809c55
commit
305e954f76
|
@ -8102,6 +8102,7 @@ static void
|
|||
weston_output_force_power(struct weston_output *output,
|
||||
enum weston_output_power_state power)
|
||||
{
|
||||
struct weston_view *view;
|
||||
enum dpms_enum dpms;
|
||||
|
||||
output->power_state = power;
|
||||
|
@ -8110,6 +8111,10 @@ weston_output_force_power(struct weston_output *output,
|
|||
output->compositor->state == WESTON_COMPOSITOR_OFFSCREEN)
|
||||
return;
|
||||
|
||||
wl_list_for_each(view, &output->compositor->view_list, link)
|
||||
if (view->output_mask & (1u << output->id))
|
||||
weston_view_assign_output(view);
|
||||
|
||||
if (!output->set_dpms || !output->enabled)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue