mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 07:38:22 +02:00
frontend: Fix crash in output resize handler
The output resized signal sends a struct weston_output as the data, not a struct weston_head. Fixes197c5e0084Signed-off-by: Derek Foreman <derek.foreman@collabora.com> (cherry picked from commit52204f55ea)
This commit is contained in:
parent
ef25333fac
commit
51dfd1be3a
1 changed files with 2 additions and 4 deletions
|
|
@ -2580,23 +2580,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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue