libweston: Allow changing scale
The RDP backend wants to be able to change scale for existing outputs, so try to hook this up mostly in the same way a mode switch works. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
bf8c7ddd8f
commit
cb796135be
@ -6698,13 +6698,16 @@ WL_EXPORT void
|
||||
weston_output_set_scale(struct weston_output *output,
|
||||
int32_t scale)
|
||||
{
|
||||
/* We can only set scale on a disabled output */
|
||||
assert(!output->enabled);
|
||||
|
||||
/* We only want to set scale once */
|
||||
assert(!output->scale);
|
||||
|
||||
output->scale = scale;
|
||||
if (!output->enabled)
|
||||
return;
|
||||
|
||||
if (output->current_scale == scale)
|
||||
return;
|
||||
|
||||
output->current_scale = scale;
|
||||
weston_mode_switch_finish(output, false, true);
|
||||
wl_signal_emit(&output->compositor->output_resized_signal, output);
|
||||
}
|
||||
|
||||
/** Sets the output transform for a given output.
|
||||
|
Loading…
Reference in New Issue
Block a user