frontend: Disable client resize for VNC remote outputs

As we're mirroring other outputs we shouldn't allow clients to resize
the output.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2024-04-01 14:10:13 +03:00 committed by Derek Foreman
parent 197c5e0084
commit f43342cf78
2 changed files with 13 additions and 0 deletions

View File

@ -2529,6 +2529,7 @@ static void
wet_output_overlap_pre_enable(struct weston_head *head,
struct weston_head *head_to_mirror)
{
head->output->mirror_of = head_to_mirror->output;
weston_output_set_position(head->output, head_to_mirror->output->pos);
}
@ -3811,6 +3812,12 @@ vnc_backend_output_configure(struct weston_output *output)
weston_config_section_get_bool(section, "resizeable", &resizeable, true);
if (output->mirror_of && resizeable) {
resizeable = false;
weston_log("Use of mirror_of disables resizing for output %s\n", output->name);
}
wet_output_set_scale(output, section, 1, 0);
weston_output_set_transform(output, WL_OUTPUT_TRANSFORM_NORMAL);

View File

@ -705,6 +705,12 @@ struct weston_output {
*/
void (*detach_head)(struct weston_output *output,
struct weston_head *head);
/**
* When set, this output is a mirror-of another output. See
* mirror-of key in [output] section.
*/
struct weston_output *mirror_of;
};
enum weston_pointer_motion_mask {