diff --git a/frontend/main.c b/frontend/main.c index 530d44f5..c688c19a 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -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); diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h index 137ad172..e52c48c2 100644 --- a/include/libweston/libweston.h +++ b/include/libweston/libweston.h @@ -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 {