From 79d331e29dc7b923714cd79a68719b39abe1e815 Mon Sep 17 00:00:00 2001 From: Jan-Simon Moeller Date: Wed, 28 Jun 2023 22:39:37 +0200 Subject: meta-agl-core: updates for Weston 12.0 Rename local bbappend and remove backported and unused patches. Bug-AGL: SPEC-4850 Change-Id: Ibc61b7905611eb2a124c7339e8a4d0b3981d276c Signed-off-by: Jan-Simon Moeller [patches updated] Signed-off-by: Scott Murray --- ...end-name-description-update-wl_output-to-.patch | 117 ----------------- ...ple-touch-Add-maximized-fullscreen-states.patch | 138 --------------------- .../wayland/weston_11.0.%.bbappend | 1 - .../wayland/weston_11.0_aglcore.inc | 27 ---- .../wayland/weston_12.0.%.bbappend | 1 + .../wayland/weston_12.0_aglcore.inc | 25 ++++ 6 files changed, 26 insertions(+), 283 deletions(-) delete mode 100644 meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Send-name-description-update-wl_output-to-.patch delete mode 100644 meta-agl-core/recipes-graphics/wayland/weston/0001-simple-touch-Add-maximized-fullscreen-states.patch delete mode 100644 meta-agl-core/recipes-graphics/wayland/weston_11.0.%.bbappend delete mode 100644 meta-agl-core/recipes-graphics/wayland/weston_11.0_aglcore.inc create mode 100644 meta-agl-core/recipes-graphics/wayland/weston_12.0.%.bbappend create mode 100644 meta-agl-core/recipes-graphics/wayland/weston_12.0_aglcore.inc (limited to 'meta-agl-core/recipes-graphics') diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Send-name-description-update-wl_output-to-.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Send-name-description-update-wl_output-to-.patch deleted file mode 100644 index 4e0e2c587..000000000 --- a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Send-name-description-update-wl_output-to-.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 5361d157ff6b11d5cb7a9f989abe5f376c9e2efa Mon Sep 17 00:00:00 2001 -From: Marius Vlad -Date: Wed, 24 Aug 2022 11:43:06 +0300 -Subject: [PATCH] libweston: Send name,description, update wl_output to ver 4 - -These have been in wayland a while back with version 1.20.0. - -We also need to update the test client helper with this bump, as -those bind to version 4. - -Upstream-Status: Pending - -Signed-off-by: Marius Vlad ---- - libweston/compositor.c | 14 +++++++++++++- - tests/weston-test-client-helper.c | 18 ++++++++++++++++++ - tests/weston-test-client-helper.h | 2 ++ - 3 files changed, 33 insertions(+), 1 deletion(-) - -diff --git a/libweston/compositor.c b/libweston/compositor.c -index 1670c50..af7c71e 100644 ---- a/libweston/compositor.c -+++ b/libweston/compositor.c -@@ -184,6 +184,12 @@ weston_mode_switch_send_events(struct weston_head *head, - if (version >= WL_OUTPUT_SCALE_SINCE_VERSION && scale_changed) - wl_output_send_scale(resource, output->current_scale); - -+ if (version >= WL_OUTPUT_NAME_SINCE_VERSION) -+ wl_output_send_name(resource, head->name); -+ -+ if (version >= WL_OUTPUT_DESCRIPTION_SINCE_VERSION) -+ wl_output_send_description(resource, head->model); -+ - if (version >= WL_OUTPUT_DONE_SINCE_VERSION) - wl_output_send_done(resource); - } -@@ -5198,6 +5204,12 @@ bind_output(struct wl_client *client, - mode->refresh); - } - -+ if (version >= WL_OUTPUT_NAME_SINCE_VERSION) -+ wl_output_send_name(resource, head->name); -+ -+ if (version >= WL_OUTPUT_DESCRIPTION_SINCE_VERSION) -+ wl_output_send_description(resource, head->model); -+ - if (version >= WL_OUTPUT_DONE_SINCE_VERSION) - wl_output_send_done(resource); - } -@@ -5206,7 +5218,7 @@ static void - weston_head_add_global(struct weston_head *head) - { - head->global = wl_global_create(head->compositor->wl_display, -- &wl_output_interface, 3, -+ &wl_output_interface, 4, - head, bind_output); - } - -diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c -index 01c4b80..8369c40 100644 ---- a/tests/weston-test-client-helper.c -+++ b/tests/weston-test-client-helper.c -@@ -715,6 +715,20 @@ output_handle_scale(void *data, - output->scale = scale; - } - -+static void -+output_handle_name(void *data, struct wl_output *wl_output, const char *name) -+{ -+ struct output *output = data; -+ output->name = strdup(name); -+} -+ -+static void -+output_handle_description(void *data, struct wl_output *wl_output, const char *desc) -+{ -+ struct output *output = data; -+ output->name = strdup(desc); -+} -+ - static void - output_handle_done(void *data, - struct wl_output *wl_output) -@@ -729,6 +743,8 @@ static const struct wl_output_listener output_listener = { - output_handle_mode, - output_handle_done, - output_handle_scale, -+ output_handle_name, -+ output_handle_description, - }; - - static void -@@ -737,6 +753,8 @@ output_destroy(struct output *output) - assert(wl_proxy_get_version((struct wl_proxy *)output->wl_output) >= 3); - wl_output_release(output->wl_output); - wl_list_remove(&output->link); -+ free(output->name); -+ free(output->desc); - free(output); - } - -diff --git a/tests/weston-test-client-helper.h b/tests/weston-test-client-helper.h -index 8e1505d..9e05009 100644 ---- a/tests/weston-test-client-helper.h -+++ b/tests/weston-test-client-helper.h -@@ -163,6 +163,8 @@ struct output { - int height; - int scale; - int initialized; -+ char *name; -+ char *desc; - }; - - struct buffer { --- -2.35.1 - diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-simple-touch-Add-maximized-fullscreen-states.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-simple-touch-Add-maximized-fullscreen-states.patch deleted file mode 100644 index 53a620ef7..000000000 --- a/meta-agl-core/recipes-graphics/wayland/weston/0001-simple-touch-Add-maximized-fullscreen-states.patch +++ /dev/null @@ -1,138 +0,0 @@ -From 666300564093838c7d6a723fbce7e3b1a719e873 Mon Sep 17 00:00:00 2001 -From: Marius Vlad -Date: Thu, 22 Dec 2022 18:27:14 +0200 -Subject: [PATCH 1/3] simple-touch: Add maximized/fullscreen states - -Helpful to have other states like maximized or fullscreen for -the simple-touch client. - -Upstream-Status: Pending - -Signed-off-by: Marius Vlad ---- - clients/simple-touch.c | 55 ++++++++++++++++++++++++++++++++++++------ - 1 file changed, 48 insertions(+), 7 deletions(-) - -diff --git a/clients/simple-touch.c b/clients/simple-touch.c -index 6559aa24d..e32013161 100644 ---- a/clients/simple-touch.c -+++ b/clients/simple-touch.c -@@ -64,9 +64,13 @@ struct touch { - struct xdg_toplevel *xdg_toplevel; - struct buffer *buffer; - int width, height; -+ int init_width, init_height; - bool running; - bool wait_for_configure; -+ bool needs_buffer_update; - bool has_argb; -+ bool maximized; -+ bool fullscreen; - }; - - static struct buffer * -@@ -111,7 +115,7 @@ create_shm_buffer(struct touch *touch) - } - - static void --initial_redraw(void *data) -+redraw(void *data) - { - struct touch *touch = data; - struct buffer *buffer = NULL; -@@ -119,6 +123,9 @@ initial_redraw(void *data) - buffer = create_shm_buffer(touch); - assert(buffer); - -+ if (touch->buffer) -+ free(touch->buffer); -+ - touch->buffer = buffer; - - /* paint the "work-area" */ -@@ -283,9 +290,10 @@ handle_xdg_surface_configure(void *data, struct xdg_surface *surface, - - xdg_surface_ack_configure(surface, serial); - -- if (touch->wait_for_configure) { -- initial_redraw(touch); -+ if (touch->wait_for_configure || touch->needs_buffer_update) { -+ redraw(touch); - touch->wait_for_configure = false; -+ touch->needs_buffer_update = false; - } - } - -@@ -340,9 +348,40 @@ static const struct wl_registry_listener registry_listener = { - - static void - handle_toplevel_configure(void *data, struct xdg_toplevel *xdg_toplevel, -- int32_t width, int32_t height, -- struct wl_array *state) -+ int32_t width, int32_t height, struct wl_array *states) - { -+ struct touch *touch = data; -+ uint32_t *p; -+ -+ touch->fullscreen = false; -+ touch->maximized = false; -+ -+ wl_array_for_each(p, states) { -+ uint32_t state = *p; -+ switch (state) { -+ case XDG_TOPLEVEL_STATE_FULLSCREEN: -+ touch->fullscreen = true; -+ break; -+ case XDG_TOPLEVEL_STATE_MAXIMIZED: -+ touch->maximized = true; -+ break; -+ } -+ } -+ -+ if (width > 0 && height > 0) { -+ if (!touch->fullscreen && !touch->maximized) { -+ touch->init_width = width; -+ touch->init_width = height; -+ } -+ touch->width = width; -+ touch->height = height; -+ } else if (!touch->fullscreen && !touch->maximized) { -+ touch->width = touch->init_width; -+ touch->height = touch->init_height; -+ -+ } -+ -+ touch->needs_buffer_update = true; - } - - static void -@@ -371,6 +410,7 @@ touch_create(int width, int height) - assert(touch->display); - - touch->has_argb = false; -+ touch->buffer = NULL; - touch->registry = wl_display_get_registry(touch->display); - wl_registry_add_listener(touch->registry, ®istry_listener, touch); - wl_display_dispatch(touch->display); -@@ -386,8 +426,8 @@ touch_create(int width, int height) - exit(1); - } - -- touch->width = width; -- touch->height = height; -+ touch->init_width = width; -+ touch->init_height = height; - touch->surface = wl_compositor_create_surface(touch->compositor); - - touch->xdg_surface = -@@ -403,6 +443,7 @@ touch_create(int width, int height) - xdg_toplevel_set_title(touch->xdg_toplevel, "simple-touch"); - xdg_toplevel_set_app_id(touch->xdg_toplevel, "simple-touch"); - touch->wait_for_configure = true; -+ touch->needs_buffer_update = false; - wl_surface_commit(touch->surface); - - touch->running = true; --- -2.35.1 - diff --git a/meta-agl-core/recipes-graphics/wayland/weston_11.0.%.bbappend b/meta-agl-core/recipes-graphics/wayland/weston_11.0.%.bbappend deleted file mode 100644 index d968cc01e..000000000 --- a/meta-agl-core/recipes-graphics/wayland/weston_11.0.%.bbappend +++ /dev/null @@ -1 +0,0 @@ -require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'weston_11.0_aglcore.inc', '', d)} diff --git a/meta-agl-core/recipes-graphics/wayland/weston_11.0_aglcore.inc b/meta-agl-core/recipes-graphics/wayland/weston_11.0_aglcore.inc deleted file mode 100644 index de816736a..000000000 --- a/meta-agl-core/recipes-graphics/wayland/weston_11.0_aglcore.inc +++ /dev/null @@ -1,27 +0,0 @@ -FILESEXTRAPATHS:append := ":${THISDIR}/weston" - -PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'weston-remoting', ' remoting', '', d)}" - -SRC_URI:append = "file://0001-libweston-Send-name-description-update-wl_output-to-.patch \ - file://0001-simple-touch-Add-maximized-fullscreen-states.patch \ - file://0001-libweston-weston-log-Add-a-iterator-helper-for-debug.patch " - -# Split weston-terminal out of the main package to allow installing it -# separately for use with other compositors. The icons, etc. that end -# up in /usr/share/weston are also split out into a separate package -# since they are required for weston-terminal and some of the programs -# packaged in weston-examples in addition to ivi-shell in the main -# package. - -PACKAGE_BEFORE_PN += "${PN}-data ${PN}-terminal" - -FILES:${PN}-data = "${datadir}/weston" - -FILES:${PN}-terminal = "${bindir}/weston-terminal" -RDEPENDS:${PN}-terminal += "weston-data liberation-fonts" - -RDEPENDS:${PN}-examples += "weston-data" - -FILES:${PN}:remove = "weston-terminal" -RDEPENDS:${PN}:remove = "liberation-fonts" -RDEPENDS:${PN} += "weston-data weston-terminal" diff --git a/meta-agl-core/recipes-graphics/wayland/weston_12.0.%.bbappend b/meta-agl-core/recipes-graphics/wayland/weston_12.0.%.bbappend new file mode 100644 index 000000000..8d425b3e6 --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/weston_12.0.%.bbappend @@ -0,0 +1 @@ +require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'weston_12.0_aglcore.inc', '', d)} diff --git a/meta-agl-core/recipes-graphics/wayland/weston_12.0_aglcore.inc b/meta-agl-core/recipes-graphics/wayland/weston_12.0_aglcore.inc new file mode 100644 index 000000000..caec5b90a --- /dev/null +++ b/meta-agl-core/recipes-graphics/wayland/weston_12.0_aglcore.inc @@ -0,0 +1,25 @@ +FILESEXTRAPATHS:append := ":${THISDIR}/weston" + +PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'weston-remoting', ' remoting', '', d)}" + +SRC_URI:append = "file://0001-libweston-weston-log-Add-a-iterator-helper-for-debug.patch " + +# Split weston-terminal out of the main package to allow installing it +# separately for use with other compositors. The icons, etc. that end +# up in /usr/share/weston are also split out into a separate package +# since they are required for weston-terminal and some of the programs +# packaged in weston-examples in addition to ivi-shell in the main +# package. + +PACKAGE_BEFORE_PN += "${PN}-data ${PN}-terminal" + +FILES:${PN}-data = "${datadir}/weston" + +FILES:${PN}-terminal = "${bindir}/weston-terminal" +RDEPENDS:${PN}-terminal += "weston-data liberation-fonts" + +RDEPENDS:${PN}-examples += "weston-data" + +FILES:${PN}:remove = "weston-terminal" +RDEPENDS:${PN}:remove = "liberation-fonts" +RDEPENDS:${PN} += "weston-data weston-terminal" -- cgit 1.2.3-korg