From 52204f55eae8e1b0e351d56742fb9c74659be648 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 24 Apr 2025 09:28:52 -0500 Subject: [PATCH] frontend: Fix crash in output resize handler The output resized signal sends a struct weston_output as the data, not a struct weston_head. Fixes 197c5e0084 Signed-off-by: Derek Foreman --- frontend/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/main.c b/frontend/main.c index b895fae50..54d7b7bca 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -2633,23 +2633,21 @@ wet_output_overlap_post_enable(struct weston_head *head, static void simple_heads_output_sharing_resize(struct wl_listener *listener, void *data) { - struct weston_head *head = data; struct weston_head *head_to_mirror = NULL; - struct weston_output *output; + struct weston_output *output = data; struct wet_head_tracker *head_track = container_of(listener, struct wet_head_tracker, resized_listener); struct wet_compositor *wet = head_track->wet; struct weston_mode mode; int scale = 1; - output = weston_head_get_output(head); head_to_mirror = wet_config_find_head_to_mirror(output, wet); if (!head_to_mirror) return; weston_output_set_position(head_to_mirror->output, output->pos); - wet_output_compute_output_from_mirror(head->output, + wet_output_compute_output_from_mirror(output, head_to_mirror->output, &mode, &scale); weston_output_mode_set_native(head_to_mirror->output, &mode, scale);