diff options
author | 2021-02-24 17:09:40 -0500 | |
---|---|---|
committer | 2022-03-29 15:41:54 -0400 | |
commit | 4bd77c11f14157259b8d15bddcee28ddb6e8041c (patch) | |
tree | defd6687d269216e778070d3e229e15940256388 | |
parent | e4226be8727e4f8e19292b6d1d19a9ba2bcdd58d (diff) |
Weston 9.0 compatibility changes
Changes:
- Bump libweston dependencies in meson.build
- Match weston_compositor_tear_down -> weston_compositor_destroy API
change by following what was done in weston for 9.0
- Update log context code to match API changes, based on what was
done in weston for 9.0
- Update transform names to match weston
- Initialize a couple of structure fields to avoid failure from
-Werror=missing-field-initializers triggered by changes in newer
wayland.
Bug-AGL: SPEC-3819
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I48fab590eb59a1b83b0cebc3762ba730450b0e3a
-rw-r--r-- | clients/screenshooter.c | 2 | ||||
-rw-r--r-- | meson.build | 4 | ||||
-rw-r--r-- | src/compositor.c | 34 |
3 files changed, 20 insertions, 20 deletions
diff --git a/clients/screenshooter.c b/clients/screenshooter.c index b68f4ad..986e7bd 100644 --- a/clients/screenshooter.c +++ b/clients/screenshooter.c @@ -150,6 +150,8 @@ static const struct wl_output_listener output_listener = { display_handle_mode, display_handle_done, display_handle_scale, + NULL, + NULL }; static void diff --git a/meson.build b/meson.build index 218779d..17913d0 100644 --- a/meson.build +++ b/meson.build @@ -10,7 +10,7 @@ project('agl-compositor', ) config_h = configuration_data() -libweston_version = 'libweston-8' +libweston_version = 'libweston-9' pkgconfig = import('pkgconfig') fs = import('fs') @@ -157,7 +157,7 @@ libweston_dep = dependency(libweston_version) deps_libweston = [ dependency('wayland-server'), libweston_dep, - dependency('libweston-desktop-8'), + dependency('libweston-desktop-9'), local_dep, ] diff --git a/src/compositor.c b/src/compositor.c index d335c60..4ac0d95 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -301,14 +301,14 @@ static int parse_transform(const char *transform, uint32_t *out) { static const struct { const char *name; uint32_t token; } transforms[] = { - { "normal", WL_OUTPUT_TRANSFORM_NORMAL }, - { "90", WL_OUTPUT_TRANSFORM_90 }, - { "180", WL_OUTPUT_TRANSFORM_180 }, - { "270", WL_OUTPUT_TRANSFORM_270 }, - { "flipped", WL_OUTPUT_TRANSFORM_FLIPPED }, - { "flipped-90", WL_OUTPUT_TRANSFORM_FLIPPED_90 }, - { "flipped-180", WL_OUTPUT_TRANSFORM_FLIPPED_180 }, - { "flipped-270", WL_OUTPUT_TRANSFORM_FLIPPED_270 }, + { "normal", WL_OUTPUT_TRANSFORM_NORMAL }, + { "rotate-90", WL_OUTPUT_TRANSFORM_90 }, + { "rotate-180", WL_OUTPUT_TRANSFORM_180 }, + { "rotate-270", WL_OUTPUT_TRANSFORM_270 }, + { "flipped", WL_OUTPUT_TRANSFORM_FLIPPED }, + { "flipped-rotate-90", WL_OUTPUT_TRANSFORM_FLIPPED_90 }, + { "flipped-rotate-180", WL_OUTPUT_TRANSFORM_FLIPPED_180 }, + { "flipped-rotate-270", WL_OUTPUT_TRANSFORM_FLIPPED_270 }, }; for (size_t i = 0; i < ARRAY_LENGTH(transforms); i++) @@ -1649,15 +1649,15 @@ int wet_main(int argc, char *argv[]) goto exit_signals; } - log_ctx = weston_log_ctx_compositor_create(); + log_ctx = weston_log_ctx_create(); if (!log_ctx) { fprintf(stderr, "Failed to initialize weston debug framework.\n"); goto exit_signals; } - log_scope = weston_compositor_add_log_scope(log_ctx, "log", - "agl-compositor log\n", - NULL, NULL, NULL); + log_scope = weston_log_ctx_add_log_scope(log_ctx, "log", + "agl-compositor log\n", + NULL, NULL, NULL); log_file_open(log); weston_log_set_handler(vlog, vlog_continue); @@ -1774,15 +1774,13 @@ error_compositor: free(modules); modules = NULL; - weston_compositor_tear_down(ivi.compositor); + weston_compositor_destroy(ivi.compositor); - weston_compositor_log_scope_destroy(log_scope); + weston_log_scope_destroy(log_scope); log_scope = NULL; - weston_log_ctx_compositor_destroy(ivi.compositor); - weston_compositor_destroy(ivi.compositor); - - weston_log_subscriber_destroy_log(logger); + weston_log_subscriber_destroy(logger); + weston_log_ctx_destroy(log_ctx); ivi_policy_destroy(ivi.policy); |