summaryrefslogtreecommitdiffstats
path: root/meta-agl-core/recipes-graphics/wayland
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-core/recipes-graphics/wayland')
-rw-r--r--meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb2
-rw-r--r--meta-agl-core/recipes-graphics/wayland/native-shell-client_git.bb2
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb38
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend2
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in5
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-backend-drm-make-sure-all-buffers-are-released-when-.patch71
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch30
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Add-paint-node-destruction-into-weston_lay.patch60
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Send-name-description-update-wl_output-to-.patch117
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-desktop-xdg-shell-Add-tiled-orientation-st.patch171
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-weston-log-Add-a-iterator-helper-for-debug.patch227
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-simple-touch-Add-maximized-fullscreen-states.patch138
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston_13.0.%.bbappend (renamed from meta-agl-core/recipes-graphics/wayland/weston_10.0.%.bbappend)2
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc (renamed from meta-agl-core/recipes-graphics/wayland/weston_10.0_aglcore.inc)12
14 files changed, 107 insertions, 770 deletions
diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb b/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb
index 3596cbb06..41240309b 100644
--- a/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb
+++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fac6abe0003c4d142ff8fa1f18316df0"
DEPENDS = "wayland wayland-protocols wayland-native weston"
SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/agl-compositor.git;protocol=https;branch=${AGL_BRANCH}"
-SRCREV = "d5ecd12729734b788546e0d80edc492454bec251"
+SRCREV = "18e93caca8ad397d504215d673765871b2c88f25"
AGL_BRANCH:aglnext = "next"
SRCREV:aglnext = "${AUTOREV}"
diff --git a/meta-agl-core/recipes-graphics/wayland/native-shell-client_git.bb b/meta-agl-core/recipes-graphics/wayland/native-shell-client_git.bb
index 8afa75deb..c0c31e029 100644
--- a/meta-agl-core/recipes-graphics/wayland/native-shell-client_git.bb
+++ b/meta-agl-core/recipes-graphics/wayland/native-shell-client_git.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3b90ee643ce04400848a8f0deb492a4a"
DEPENDS = "wayland wayland-protocols wayland-native agl-compositor"
SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/native-shell-client.git;protocol=https;branch=${AGL_BRANCH}"
-SRCREV = "43c907756f8eb5c3ac0d4f24b962285968389b89"
+SRCREV = "099e06f532eff7c56bf00eb58420f14c95a8e554"
PV = "0.0.1+git${SRCPV}"
S = "${WORKDIR}/git"
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb
index 0611ec5b4..574f89f2b 100644
--- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb
@@ -13,7 +13,6 @@ SRC_URI = " \
file://hdmi-a-2-90.cfg \
file://hdmi-a-2-180.cfg \
file://hdmi-a-2-270.cfg \
- file://remote-output.cfg.in \
file://virtual-0.cfg \
file://virtual-90.cfg \
file://virtual-180.cfg \
@@ -36,18 +35,6 @@ WESTON_FRAGMENTS = "core shell grpc-proxy ${WESTON_DISPLAYS}"
# On-target weston.ini directory
weston_ini_dir = "${sysconfdir}/xdg/weston"
-# Options for the user to change in local.conf
-# e.g. REMOTING_OUTPUT_MODE = "1080x1488"
-REMOTING_OUTPUT_MODE ??= "640x720@30"
-REMOTING_OUTPUT_HOST ??= "192.168.10.3"
-REMOTING_OUTPUT_PORT ??= "5005"
-
-do_configure() {
- sed -e "s#host=.*#host=${REMOTING_OUTPUT_HOST}#" \
- -e "s#port=.*#port=${REMOTING_OUTPUT_PORT}#" \
- ${WORKDIR}/remote-output.cfg.in > ${WORKDIR}/remote-output.cfg
-}
-
do_compile() {
# Put all of our cfg files together for a default portrait
# orientation configuration
@@ -109,47 +96,42 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
ALTERNATIVE_LINK_NAME[weston.ini] = "${weston_ini_dir}/weston.ini"
RPROVIDES:${PN} = "weston-ini"
-RCONFLICTS:${PN} = "${PN}-landscape"
ALTERNATIVE:${PN} = "weston.ini"
ALTERNATIVE_TARGET_${PN} = "${weston_ini_dir}/weston.ini.default"
-PACKAGE_BEFORE_PN += "${PN}-landscape"
+# landscape
+PACKAGE_BEFORE_PN += "${PN}-landscape"
FILES:${PN}-landscape = "${weston_ini_dir}/weston.ini.landscape"
-
RPROVIDES:${PN}-landscape = "weston-ini"
-RCONFLICTS:${PN}-landscape = "${PN}"
ALTERNATIVE:${PN}-landscape = "weston.ini"
ALTERNATIVE_TARGET_${PN}-landscape = "${weston_ini_dir}/weston.ini.landscape"
+ALTERNATIVE_PRIORITY_${PN}-landscape = "20"
-PACKAGE_BEFORE_PN += "${PN}-landscape-inverted"
+# landscape-inverted
+PACKAGE_BEFORE_PN += "${PN}-landscape-inverted"
FILES:${PN}-landscape-inverted = "${weston_ini_dir}/weston.ini.landscape-inverted"
-
RPROVIDES:${PN}-landscape-inverted = "weston-ini"
-RCONFLICTS:${PN}-landscape-inverted = "${PN}"
ALTERNATIVE:${PN}-landscape-inverted = "weston.ini"
ALTERNATIVE_TARGET_${PN}-landscape-inverted = "${weston_ini_dir}/weston.ini.landscape-inverted"
+ALTERNATIVE_PRIORITY_${PN}-landscape-inverted = "25"
-# no activation by default
+# no-activate, no activation by default
PACKAGE_BEFORE_PN += "${PN}-no-activate"
-
FILES:${PN}-no-activate = "${weston_ini_dir}/weston.ini.default-no-activate"
-
RPROVIDES:${PN}-no-activate = "weston-ini"
-RCONFLICTS:${PN}-no-activate = "${PN}"
ALTERNATIVE:${PN}-no-activate = "weston.ini"
ALTERNATIVE_TARGET_${PN}-no-activate = "${weston_ini_dir}/weston.ini.default-no-activate"
+ALTERNATIVE_PRIORITY_${PN}-no-activate = "21"
-# landscape, no activation by default
+# landscape-no-activate, no activation by default
PACKAGE_BEFORE_PN += "${PN}-landscape-no-activate"
-
FILES:${PN}-landscape-no-activate = "${weston_ini_dir}/weston.ini.landscape-no-activate"
-
RPROVIDES:${PN}-landscape-no-activate = "weston-ini"
-RCONFLICTS:${PN}-landscape-no-activate = "${PN}"
ALTERNATIVE:${PN}-landscape-no-activate = "weston.ini"
ALTERNATIVE_TARGET_${PN}-landscape-no-activate = "${weston_ini_dir}/weston.ini.landscape-no-activate"
+ALTERNATIVE_PRIORITY_${PN}-landscape-no-activate = "26"
# This is a settings-only package, we do not need a development package
# (and its fixed dependency to ${PN} being installed)
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend
index 746bde339..b6095f2fa 100644
--- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend
@@ -2,8 +2,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-WESTON_DISPLAYS:append = "${@bb.utils.contains("DISTRO_FEATURES", "weston-remoting", " remote-output", "", d)}"
-
# For virtual machines and intel-corei7-64 we want to support both the HDMI-A-1
# and Virtual-1 outputs. This allows us to run virtual images on real hardware
# and vice versa.
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in
deleted file mode 100644
index 940cbdd0c..000000000
--- a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg.in
+++ /dev/null
@@ -1,5 +0,0 @@
-[remote-output]
-name=remote-1
-mode=640x720@30
-host=192.168.10.3
-port=5005
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-backend-drm-make-sure-all-buffers-are-released-when-.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-backend-drm-make-sure-all-buffers-are-released-when-.patch
deleted file mode 100644
index fc2f35bd6..000000000
--- a/meta-agl-core/recipes-graphics/wayland/weston/0001-backend-drm-make-sure-all-buffers-are-released-when-.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 6d9e9dfa0479abc0ed7921a4ebf42228c0da7533 Mon Sep 17 00:00:00 2001
-From: Michael Olbrich <m.olbrich@pengutronix.de>
-Date: Wed, 22 Jun 2022 08:58:21 +0200
-Subject: [PATCH] backend-drm: make sure all buffers are released when an
- output is removed
-
-When an output is destroyed then the output state is freed immediately. In this
-case, the plane state is only partially destroyed because it is the currently
-active state. This includes the buffer reference.
-
-Without the output, the plane will not be updated any more until it is used by a
-different output (if possible) or the output returns and the plane is used
-again.
-As a result, the buffer reference is kept for a long time. This will cause some
-applications to stall because weston now keeps two buffers (the one here and
-another one for a different output where the application is now displayed).
-
-To avoid this, do a synchronous commit that disables the output. The output
-needs to be disabled anyways and this way the current state contains no
-buffers that would remain.
-
-`device->state_invalid = true` in drm_output_detach_crtc() is no longer
-needed, because drm_output_detach_crtc() is called only when initialization
-failed and the crtc was not yet used or in drm_output_deinit() when the
-crtc was already disabled with the new synchronous commit.
-
-Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-(cherry picked from commit f5a4fb5abcb8aeb6b078b6235834cc4ab6176c26)
-
-Upstream-Status: Pending
-
----
- libweston/backend-drm/drm.c | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c
-index 42787702..8425b0e9 100644
---- a/libweston/backend-drm/drm.c
-+++ b/libweston/backend-drm/drm.c
-@@ -1769,14 +1769,11 @@ drm_output_attach_crtc(struct drm_output *output)
- static void
- drm_output_detach_crtc(struct drm_output *output)
- {
-- struct drm_backend *b = output->backend;
- struct drm_crtc *crtc = output->crtc;
-
- crtc->output = NULL;
- output->crtc = NULL;
-
-- /* Force resetting unused CRTCs */
-- b->state_invalid = true;
- }
-
- static int
-@@ -1839,6 +1836,13 @@ drm_output_deinit(struct weston_output *base)
- {
- struct drm_output *output = to_drm_output(base);
- struct drm_backend *b = to_drm_backend(base->compositor);
-+ struct drm_pending_state *pending;
-+
-+ if (!b->shutting_down) {
-+ pending = drm_pending_state_alloc(b);
-+ drm_output_get_disable_state(pending, output);
-+ drm_pending_state_apply_sync(pending);
-+ }
-
- if (b->use_pixman)
- drm_output_fini_pixman(output);
---
-2.39.2
-
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch
new file mode 100644
index 000000000..202333a5e
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston/0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch
@@ -0,0 +1,30 @@
+From 6a847464de9e773f6d1490916d0df48a0f90eeba Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Thu, 5 Oct 2023 16:27:34 +0300
+Subject: [PATCH] clients: Handle missing pointer_surface is there's no pointer
+ event
+
+Upstream-Status: Pending
+
+Bug-AGL: SPEC-4916
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ clients/window.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/clients/window.c b/clients/window.c
+index 30f6410..882e9d5 100644
+--- a/clients/window.c
++++ b/clients/window.c
+@@ -3818,7 +3818,7 @@ pointer_surface_frame_callback(void *data, struct wl_callback *callback,
+ force_frame = false;
+ }
+
+- if (!input->pointer)
++ if (!input->pointer || !input->pointer_surface)
+ return;
+
+ if (input_set_pointer_special(input))
+--
+2.35.1
+
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Add-paint-node-destruction-into-weston_lay.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Add-paint-node-destruction-into-weston_lay.patch
new file mode 100644
index 000000000..19eadcf7f
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Add-paint-node-destruction-into-weston_lay.patch
@@ -0,0 +1,60 @@
+From cfde02d47a503cbfd0629bbfe0cb776686af8a91 Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Tue, 9 Apr 2024 18:34:22 +0300
+Subject: [PATCH] libweston: Add paint node destruction into
+ weston_layer_entry_remove()
+
+This prevents a potential crash where users of
+weston_layer_entry_insert/layer_entry_remove() would see when moving
+views into a NULL layer (effectively unmapping the surface/view).
+
+Users that have migrated to the weston_view_move_to_layer() are immune
+to this issue because that takes care paint node destruction.
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ libweston/compositor.c | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/libweston/compositor.c b/libweston/compositor.c
+index bb29b83b5..ea257bb90 100644
+--- a/libweston/compositor.c
++++ b/libweston/compositor.c
+@@ -3980,17 +3980,10 @@ weston_view_move_to_layer(struct weston_view *view,
+ struct weston_layer_entry *layer)
+ {
+ bool was_mapped = view->is_mapped;
+- struct weston_paint_node *pnode, *pntmp;
+
+ if (layer == &view->layer_link)
+ return;
+
+- /* Remove all paint nodes because we have no idea what a layer change
+- * does to view visibility on any output.
+- */
+- wl_list_for_each_safe(pnode, pntmp, &view->paint_node_list, view_link)
+- weston_paint_node_destroy(pnode);
+-
+ view->surface->compositor->view_list_needs_rebuild = true;
+
+ /* Damage the view's old region, and remove it from the layer. */
+@@ -4020,6 +4013,16 @@ weston_view_move_to_layer(struct weston_view *view,
+ WL_EXPORT void
+ weston_layer_entry_remove(struct weston_layer_entry *entry)
+ {
++ struct weston_paint_node *pnode, *pntmp;
++ struct weston_view *view;
++
++ /* Remove all paint nodes because we have no idea what a layer change
++ * does to view visibility on any output.
++ */
++ view = container_of(entry, struct weston_view, layer_link);
++ wl_list_for_each_safe(pnode, pntmp, &view->paint_node_list, view_link)
++ weston_paint_node_destroy(pnode);
++
+ wl_list_remove(&entry->link);
+ wl_list_init(&entry->link);
+ entry->layer = NULL;
+--
+2.43.0
+
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 <marius.vlad@collabora.com>
-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 <marius.vlad@collabora.com>
----
- 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-libweston-desktop-xdg-shell-Add-tiled-orientation-st.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-desktop-xdg-shell-Add-tiled-orientation-st.patch
deleted file mode 100644
index 02349c098..000000000
--- a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-desktop-xdg-shell-Add-tiled-orientation-st.patch
+++ /dev/null
@@ -1,171 +0,0 @@
-From 6ab4713d3eba589aa1f39eee2b48c81906d7ba87 Mon Sep 17 00:00:00 2001
-From: Marius Vlad <marius.vlad@collabora.com>
-Date: Tue, 16 Aug 2022 13:34:19 +0300
-Subject: [PATCH] libweston/desktop/xdg-shell: Add tiled orientation states
-
-With the help of a newly introduced function, weston_desktop_surface_set_orientation(),
-this patch adds missing tiled states from the xdg-shell protocol.
-The orientation state is passed on as a bitmask enumeration flag, which the
-shell can set, allowing multiple tiling states at once.
-
-These new states are incorporated the same way as the others, retaining
-the set state, but also avoiding sending new configure events if nothing
-changed since previously acked data.
-
-Upstream-Status: Pending
-
-Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-(cherry-picked from 37a3025d893def991dec59587d17672aa3bf967a)
-
-Note that this was actually ported because libweston-desktop is not
-embedded into libweston and the structure changed in upstream.
----
- include/libweston-desktop/libweston-desktop.h | 11 ++++++
- libweston-desktop/internal.h | 2 +
- libweston-desktop/surface.c | 10 +++++
- libweston-desktop/xdg-shell.c | 38 +++++++++++++++++++
- 4 files changed, 61 insertions(+)
-
-diff --git a/include/libweston-desktop/libweston-desktop.h b/include/libweston-desktop/libweston-desktop.h
-index 3e7ac73..c296d16 100644
---- a/include/libweston-desktop/libweston-desktop.h
-+++ b/include/libweston-desktop/libweston-desktop.h
-@@ -44,6 +44,14 @@ enum weston_desktop_surface_edge {
- WESTON_DESKTOP_SURFACE_EDGE_BOTTOM_RIGHT = 10,
- };
-
-+enum weston_top_level_tiled_orientation {
-+ WESTON_TOP_LEVEL_TILED_ORIENTATION_NONE = 0 << 0,
-+ WESTON_TOP_LEVEL_TILED_ORIENTATION_LEFT = 1 << 1,
-+ WESTON_TOP_LEVEL_TILED_ORIENTATION_RIGHT = 1 << 2,
-+ WESTON_TOP_LEVEL_TILED_ORIENTATION_TOP = 1 << 3,
-+ WESTON_TOP_LEVEL_TILED_ORIENTATION_BOTTOM = 1 << 4,
-+};
-+
- struct weston_desktop;
- struct weston_desktop_client;
- struct weston_desktop_surface;
-@@ -163,6 +171,9 @@ void
- weston_desktop_surface_set_size(struct weston_desktop_surface *surface,
- int32_t width, int32_t height);
- void
-+weston_desktop_surface_set_orientation(struct weston_desktop_surface *surface,
-+ enum weston_top_level_tiled_orientation tile_orientation);
-+void
- weston_desktop_surface_close(struct weston_desktop_surface *surface);
- void
- weston_desktop_surface_add_metadata_listener(struct weston_desktop_surface *surface,
-diff --git a/libweston-desktop/internal.h b/libweston-desktop/internal.h
-index 2606d27..8afdede 100644
---- a/libweston-desktop/internal.h
-+++ b/libweston-desktop/internal.h
-@@ -100,6 +100,8 @@ struct weston_desktop_surface_implementation {
- void *user_data, bool resizing);
- void (*set_size)(struct weston_desktop_surface *surface,
- void *user_data, int32_t width, int32_t height);
-+ void (*set_orientation)(struct weston_desktop_surface *surface,
-+ void *user_data, enum weston_top_level_tiled_orientation tiled_orientation);
- void (*committed)(struct weston_desktop_surface *surface, void *user_data,
- int32_t sx, int32_t sy);
- void (*update_position)(struct weston_desktop_surface *surface,
-diff --git a/libweston-desktop/surface.c b/libweston-desktop/surface.c
-index 433f08a..6b3f4ae 100644
---- a/libweston-desktop/surface.c
-+++ b/libweston-desktop/surface.c
-@@ -506,6 +506,16 @@ weston_desktop_surface_set_size(struct weston_desktop_surface *surface, int32_t
- width, height);
- }
-
-+WL_EXPORT void
-+weston_desktop_surface_set_orientation(struct weston_desktop_surface *surface,
-+ enum weston_top_level_tiled_orientation tile_orientation)
-+{
-+ if (surface->implementation->set_orientation != NULL)
-+ surface->implementation->set_orientation(surface,
-+ surface->implementation_data,
-+ tile_orientation);
-+}
-+
- WL_EXPORT void
- weston_desktop_surface_close(struct weston_desktop_surface *surface)
- {
-diff --git a/libweston-desktop/xdg-shell.c b/libweston-desktop/xdg-shell.c
-index ff76c39..1e49147 100644
---- a/libweston-desktop/xdg-shell.c
-+++ b/libweston-desktop/xdg-shell.c
-@@ -94,6 +94,7 @@ struct weston_desktop_xdg_toplevel_state {
- bool fullscreen;
- bool resizing;
- bool activated;
-+ uint32_t tiled_orientation;
- };
-
- struct weston_desktop_xdg_toplevel_configure {
-@@ -624,6 +625,29 @@ weston_desktop_xdg_toplevel_send_configure(struct weston_desktop_xdg_toplevel *t
- s = wl_array_add(&states, sizeof(uint32_t));
- *s = XDG_TOPLEVEL_STATE_ACTIVATED;
- }
-+ if (toplevel->pending.state.tiled_orientation &
-+ WESTON_TOP_LEVEL_TILED_ORIENTATION_LEFT) {
-+ s = wl_array_add(&states, sizeof(uint32_t));
-+ *s = XDG_TOPLEVEL_STATE_TILED_LEFT;
-+ }
-+
-+ if (toplevel->pending.state.tiled_orientation &
-+ WESTON_TOP_LEVEL_TILED_ORIENTATION_RIGHT) {
-+ s = wl_array_add(&states, sizeof(uint32_t));
-+ *s = XDG_TOPLEVEL_STATE_TILED_RIGHT;
-+ }
-+
-+ if (toplevel->pending.state.tiled_orientation &
-+ WESTON_TOP_LEVEL_TILED_ORIENTATION_TOP) {
-+ s = wl_array_add(&states, sizeof(uint32_t));
-+ *s = XDG_TOPLEVEL_STATE_TILED_TOP;
-+ }
-+
-+ if (toplevel->pending.state.tiled_orientation &
-+ WESTON_TOP_LEVEL_TILED_ORIENTATION_BOTTOM) {
-+ s = wl_array_add(&states, sizeof(uint32_t));
-+ *s = XDG_TOPLEVEL_STATE_TILED_BOTTOM;
-+ }
-
- xdg_toplevel_send_configure(toplevel->resource,
- toplevel->pending.size.width,
-@@ -686,6 +710,16 @@ weston_desktop_xdg_toplevel_set_size(struct weston_desktop_surface *dsurface,
- weston_desktop_xdg_surface_schedule_configure(&toplevel->base);
- }
-
-+static void
-+weston_desktop_xdg_toplevel_set_orientation(struct weston_desktop_surface *surface, void *user_data,
-+ enum weston_top_level_tiled_orientation tiled_orientation)
-+{
-+ struct weston_desktop_xdg_toplevel *toplevel = user_data;
-+
-+ toplevel->pending.state.tiled_orientation = tiled_orientation;
-+ weston_desktop_xdg_surface_schedule_configure(&toplevel->base);
-+}
-+
- static void
- weston_desktop_xdg_toplevel_committed(struct weston_desktop_xdg_toplevel *toplevel,
- int32_t sx, int32_t sy)
-@@ -1096,6 +1130,9 @@ weston_desktop_xdg_toplevel_state_compare(struct weston_desktop_xdg_toplevel *to
- return false;
- if (toplevel->pending.state.resizing != configured.state.resizing)
- return false;
-+ if (toplevel->pending.state.tiled_orientation !=
-+ configured.state.tiled_orientation)
-+ return false;
-
- if (toplevel->pending.size.width == configured.size.width &&
- toplevel->pending.size.height == configured.size.height)
-@@ -1440,6 +1477,7 @@ static const struct weston_desktop_surface_implementation weston_desktop_xdg_sur
- .set_resizing = weston_desktop_xdg_toplevel_set_resizing,
- .set_activated = weston_desktop_xdg_toplevel_set_activated,
- .set_size = weston_desktop_xdg_toplevel_set_size,
-+ .set_orientation = weston_desktop_xdg_toplevel_set_orientation,
-
- .get_maximized = weston_desktop_xdg_toplevel_get_maximized,
- .get_fullscreen = weston_desktop_xdg_toplevel_get_fullscreen,
---
-2.35.1
-
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-weston-log-Add-a-iterator-helper-for-debug.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-weston-log-Add-a-iterator-helper-for-debug.patch
deleted file mode 100644
index 5b7a4ca76..000000000
--- a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-weston-log-Add-a-iterator-helper-for-debug.patch
+++ /dev/null
@@ -1,227 +0,0 @@
-From d5168b8eb0d881a0a6029c0b348a739147317238 Mon Sep 17 00:00:00 2001
-From: Marius Vlad <marius.vlad@collabora.com>
-Date: Mon, 29 May 2023 16:30:02 +0300
-Subject: [PATCH] libweston/weston-log: Add a iterator helper for debug scope
-
-This adds three new helpers: one to iterate over all debug scopes
-created/added and other two are for simpler getters for the scope name
-and the description.
-
-Included with this change is also a simple test to retrieve them.
-
-This is an alternative to using the debug scope list advertised when
-using the weston-debug private extension. libweston users can use this
-directly to know which scopes they can subscribe to, and there's no need
-to have a client implementation for the weston-debug protocol.
-
-Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
----
- include/libweston/weston-log.h | 10 ++++
- libweston/weston-log.c | 63 +++++++++++++++++++++++
- tests/iterate-debug-scopes-test.c | 84 +++++++++++++++++++++++++++++++
- tests/meson.build | 6 +++
- 4 files changed, 163 insertions(+)
- create mode 100644 tests/iterate-debug-scopes-test.c
-
-diff --git a/include/libweston/weston-log.h b/include/libweston/weston-log.h
-index aeb7768b..70f41675 100644
---- a/include/libweston/weston-log.h
-+++ b/include/libweston/weston-log.h
-@@ -134,6 +134,16 @@ weston_log_subscription_iterate(struct weston_log_scope *scope,
- void
- weston_log_flight_recorder_display_buffer(FILE *file);
-
-+const char *
-+weston_log_scope_get_description(struct weston_log_scope *scope);
-+
-+const char *
-+weston_log_scope_get_name(struct weston_log_scope *scope);
-+
-+struct weston_log_scope *
-+weston_log_scopes_iterate(struct weston_log_context *log_ctx,
-+ struct weston_log_scope *nscope);
-+
- #ifdef __cplusplus
- }
- #endif
-diff --git a/libweston/weston-log.c b/libweston/weston-log.c
-index 276fde26..8b4c78a5 100644
---- a/libweston/weston-log.c
-+++ b/libweston/weston-log.c
-@@ -1009,3 +1009,66 @@ weston_log_subscription_iterate(struct weston_log_scope *scope,
-
- return container_of(node, struct weston_log_subscription, source_link);
- }
-+
-+/** Iterate over all debug scopes added to a weston_log_context
-+ *
-+ * @param log_ctx the log context
-+ * @param nscope the iterator, use NULL to start from the head of the list
-+ * @returns the next log scope from list added to weston_log_ctx
-+ *
-+ * Note that that \c nscope needs to be NULL-initialized before calling
-+ * this function.
-+ *
-+ * This helper can be used by libweston users to grab all the debug scopes
-+ * created. This would be an alternative to using weston-debug private
-+ * extension.
-+ *
-+ */
-+WL_EXPORT struct weston_log_scope *
-+weston_log_scopes_iterate(struct weston_log_context *log_ctx,
-+ struct weston_log_scope *nscope)
-+{
-+ struct wl_list *list;
-+ struct wl_list *node;
-+
-+ assert(log_ctx);
-+
-+ list = &log_ctx->scope_list;
-+
-+ if (nscope) {
-+ node = nscope->compositor_link.next;
-+ } else {
-+ node = list->next;
-+ }
-+
-+ assert(node);
-+ assert(!nscope || node != &nscope->compositor_link);
-+
-+ if (node == list)
-+ return NULL;
-+
-+ return container_of(node, struct weston_log_scope, compositor_link);
-+}
-+
-+/** Helper to retrieve, in human readable form, the name of a log scope
-+ *
-+ * @param scope the scope in question
-+ * @returns the name of the scope as a pointer to a string
-+ */
-+WL_EXPORT const char *
-+weston_log_scope_get_name(struct weston_log_scope *scope)
-+{
-+ return scope->name;
-+}
-+
-+/** Helper to retreive, in human reable form, the description of a log scope
-+ *
-+ * @param scope the scope in question
-+ * @returns the description of the scope as pointer to a string
-+ *
-+ */
-+WL_EXPORT const char *
-+weston_log_scope_get_description(struct weston_log_scope *scope)
-+{
-+ return scope->desc;
-+}
-diff --git a/tests/iterate-debug-scopes-test.c b/tests/iterate-debug-scopes-test.c
-new file mode 100644
-index 00000000..82c6c5c8
---- /dev/null
-+++ b/tests/iterate-debug-scopes-test.c
-@@ -0,0 +1,84 @@
-+/*
-+ * Copyright 2023 Collabora, Ltd.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sublicense, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ *
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial
-+ * portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
-+ */
-+#include "config.h"
-+
-+#include <unistd.h>
-+#include <assert.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <string.h>
-+
-+#include <libweston/weston-log.h>
-+#include "weston-test-client-helper.h"
-+#include "weston-test-fixture-compositor.h"
-+
-+
-+static enum test_result_code
-+fixture_setup(struct weston_test_harness *harness)
-+{
-+ struct compositor_setup setup;
-+
-+ compositor_setup_defaults(&setup);
-+ setup.shell = SHELL_TEST_DESKTOP;
-+
-+ return weston_test_harness_execute_as_plugin(harness, &setup);
-+}
-+
-+DECLARE_FIXTURE_SETUP(fixture_setup);
-+
-+static void
-+iterate_debug_scopes(struct weston_compositor *compositor)
-+{
-+ struct weston_log_scope *nscope = NULL;
-+ const char *test_harness_scope = "test-harness-plugin";
-+ bool found_test_harness_debug_scope = false;
-+ struct weston_log_context *log_ctx = compositor->weston_log_ctx;
-+
-+ weston_log("Printing available debug scopes:\n");
-+
-+ while ((nscope = weston_log_scopes_iterate(log_ctx, nscope))) {
-+ const char *scope_name;
-+ const char *desc_name;
-+
-+ scope_name = weston_log_scope_get_name(nscope);
-+ assert(scope_name);
-+
-+ desc_name = weston_log_scope_get_description(nscope);
-+ assert(desc_name);
-+
-+ weston_log("\tscope name: %s, desc: %s\n", scope_name, desc_name);
-+
-+ if (strcmp(test_harness_scope, scope_name) == 0)
-+ found_test_harness_debug_scope = true;
-+ }
-+ weston_log("\n");
-+
-+ assert(found_test_harness_debug_scope);
-+}
-+
-+PLUGIN_TEST(iterate_default_debug_scopes)
-+{
-+ iterate_debug_scopes(compositor);
-+}
-diff --git a/tests/meson.build b/tests/meson.build
-index d8e96e77..e52ff5a6 100644
---- a/tests/meson.build
-+++ b/tests/meson.build
-@@ -224,6 +224,12 @@ tests = [
- ],
- 'dep_objs': [ dep_lib_desktop ]
- },
-+ { 'name': 'iterate-debug-scopes',
-+ 'sources': [
-+ 'iterate-debug-scopes-test.c',
-+ ],
-+ 'dep_objs': [ dep_libweston_public ]
-+ },
- ]
-
- tests_standalone = [
---
-2.40.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 <marius.vlad@collabora.com>
-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 <marius.vlad@collabora.com>
----
- 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, &registry_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_10.0.%.bbappend b/meta-agl-core/recipes-graphics/wayland/weston_13.0.%.bbappend
index 685894116..87cad12a0 100644
--- a/meta-agl-core/recipes-graphics/wayland/weston_10.0.%.bbappend
+++ b/meta-agl-core/recipes-graphics/wayland/weston_13.0.%.bbappend
@@ -1 +1 @@
-require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'weston_10.0_aglcore.inc', '', d)}
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'weston_13.0_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-graphics/wayland/weston_10.0_aglcore.inc b/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc
index a19e0f344..843a068b4 100644
--- a/meta-agl-core/recipes-graphics/wayland/weston_10.0_aglcore.inc
+++ b/meta-agl-core/recipes-graphics/wayland/weston_13.0_aglcore.inc
@@ -1,17 +1,13 @@
FILESEXTRAPATHS:append := ":${THISDIR}/weston"
-# Workaround for incorrect upstream definition
-PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
-PACKAGECONFIG[headless] = "-Dbackend-headless=true"
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-libweston-desktop-xdg-shell-Add-tiled-orientation-st.patch \
- file://0001-simple-touch-Add-maximized-fullscreen-states.patch \
- file://0001-backend-drm-make-sure-all-buffers-are-released-when-.patch \
- file://0001-libweston-weston-log-Add-a-iterator-helper-for-debug.patch \
+SRC_URI:append = " \
+ file://0001-clients-Handle-missing-pointer_surface-is-there-s-no.patch \
+ file://0001-libweston-Add-paint-node-destruction-into-weston_lay.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