summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2024-03-20 15:39:24 +0200
committerMarius Vlad <marius.vlad@collabora.com>2024-03-21 14:16:40 +0200
commitd27a2073e6675a3920a698dadc0a56950a5afd96 (patch)
treee7e01ea6895e577c41b8afb1645d7c063303ea92
parentbf7c3de795a3d80cb78b8fd5b8640a564fa0155d (diff)
compositor: Fix RDP and HEADLESS backends loading
Bug-AGL: SPEC-5096, SPEC-5061 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Id2a3001e02f1be62c621f942be69e5006c20e7a3
-rw-r--r--src/compositor.c19
-rw-r--r--src/layout.c2
-rw-r--r--src/shell.c2
3 files changed, 14 insertions, 9 deletions
diff --git a/src/compositor.c b/src/compositor.c
index 564c0ec..305260d 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1324,6 +1324,7 @@ load_headless_backend(struct ivi_compositor *ivi, int *argc, char **argv,
int output_count;
struct weston_compositor *c = ivi->compositor;
+ struct weston_backend *wb = NULL;
const struct weston_option options[] = {
{ WESTON_OPTION_BOOLEAN, "use-pixman", false, &force_pixman },
@@ -1360,7 +1361,11 @@ load_headless_backend(struct ivi_compositor *ivi, int *argc, char **argv,
return -1;
}
- if (ivi->window_api->create_head(c->backend, "headless") < 0) {
+ wb = weston_compositor_load_backend(ivi->compositor, WESTON_BACKEND_HEADLESS, &config.base);
+ if (!wb)
+ return -1;
+
+ if (ivi->window_api->create_head(wb, "headless") < 0) {
weston_log("Cannot create headless back-end\n");
return -1;
}
@@ -1404,6 +1409,7 @@ rdp_backend_output_configure(struct weston_output *output)
struct weston_config_section *section;
uint32_t transform = WL_OUTPUT_TRANSFORM_NORMAL;
char *transform_string;
+ struct weston_mode new_mode = {};
assert(parsed_options);
@@ -1440,13 +1446,12 @@ rdp_backend_output_configure(struct weston_output *output)
return -1;
}
- weston_output_set_transform(output, transform);
- if (api->output_set_size(output, width, height) < 0) {
- weston_log("Cannot configure output \"%s\" using weston_rdp_output_api.\n",
- output->name);
- return -1;
- }
+ new_mode.width = width;
+ new_mode.height = height;
+
+ api->output_set_mode(output, &new_mode);
+ weston_output_set_transform(output, transform);
return 0;
}
diff --git a/src/layout.c b/src/layout.c
index e649d4c..4c4ae6a 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2019 Collabora, Ltd.
+ * Copyright © 2019, 2024 Collabora, Ltd.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
diff --git a/src/shell.c b/src/shell.c
index 3ef24ef..e9898a4 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2019, 2022 Collabora, Ltd.
+ * Copyright © 2019, 2022, 2024 Collabora, Ltd.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the