summaryrefslogtreecommitdiffstats
path: root/meta-agl-core/recipes-graphics/wayland/weston
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-01-14 18:39:10 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2022-01-17 15:51:06 +0000
commitd32bfcb2301a18a1e90816319aabd966d729c66e (patch)
treedb9173af590ff7f21ba13f6eba82a9c22aa7b828 /meta-agl-core/recipes-graphics/wayland/weston
parent7ce2f7bf1da1d2eff15dfc9f0a4b7efa2be65c89 (diff)
weston_8.0_aglcore.inc: Set-up app_id for toytoolkit apps
Necessary to allow weston-terminal to be able to set-up an app_id. Bug-AGL: SPEC-4218 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I221ed0160d33136b0fd51ce9eb1277b0ce21b815 Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/27085 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Reviewed-by: Scott Murray <scott.murray@konsulko.com> Reviewed-by: Arnaud Ferraris <arnaud.ferraris@collabora.com> Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-core/recipes-graphics/wayland/weston')
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-clients-window-Add-set_app_id-function-change-Waylan.patch85
1 files changed, 85 insertions, 0 deletions
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-clients-window-Add-set_app_id-function-change-Waylan.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-clients-window-Add-set_app_id-function-change-Waylan.patch
new file mode 100644
index 000000000..9c5ae7dfa
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston/0001-clients-window-Add-set_app_id-function-change-Waylan.patch
@@ -0,0 +1,85 @@
+From f090255f242f46e1bad5ef21afea730d93cdcb9e Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Fri, 14 Jan 2022 18:36:14 +0200
+Upstream-status: Submitted
+Subject: [PATCH] clients/window: Add set_app_id function + change Wayland
+ Terminal
+
+Without this we can not switch to weston-terminal.
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ clients/terminal.c | 3 ++-
+ clients/window.c | 12 ++++++++++++
+ clients/window.h | 3 +++
+ 3 files changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/clients/terminal.c b/clients/terminal.c
+index 66e2bf5..49c88ab 100644
+--- a/clients/terminal.c
++++ b/clients/terminal.c
+@@ -2947,8 +2947,9 @@ terminal_create(struct display *display)
+ terminal->margin_bottom = -1;
+ terminal->window = window_create(display);
+ terminal->widget = window_frame_create(terminal->window, terminal);
+- terminal->title = xstrdup("Wayland Terminal");
++ terminal->title = xstrdup("weston-terminal");
+ window_set_title(terminal->window, terminal->title);
++ window_set_app_id(terminal->window, terminal->title);
+ widget_set_transparent(terminal->widget, 0);
+
+ init_state_machine(&terminal->state_machine);
+diff --git a/clients/window.c b/clients/window.c
+index 2bd303e..bfa1756 100644
+--- a/clients/window.c
++++ b/clients/window.c
+@@ -230,6 +230,7 @@ struct window {
+ struct display *display;
+ struct wl_list window_output_list;
+ char *title;
++ char *app_id;
+ struct rectangle saved_allocation;
+ struct rectangle min_allocation;
+ struct rectangle pending_allocation;
+@@ -1609,6 +1610,7 @@ window_destroy(struct window *window)
+ wl_list_remove(&window->link);
+
+ free(window->title);
++ free(window->app_id);
+ free(window);
+ }
+
+@@ -4812,6 +4814,16 @@ window_set_title(struct window *window, const char *title)
+ xdg_toplevel_set_title(window->xdg_toplevel, title);
+ }
+
++void
++window_set_app_id(struct window *window, const char *app_id)
++{
++ free(window->app_id);
++ window->app_id = strdup(app_id);
++
++ if (window->xdg_toplevel)
++ xdg_toplevel_set_app_id(window->xdg_toplevel, window->app_id);
++}
++
+ const char *
+ window_get_title(struct window *window)
+ {
+diff --git a/clients/window.h b/clients/window.h
+index c66dd06..7a1a076 100644
+--- a/clients/window.h
++++ b/clients/window.h
+@@ -500,6 +500,9 @@ window_set_locked_pointer_motion_handler(
+ void
+ window_set_title(struct window *window, const char *title);
+
++void
++window_set_app_id(struct window *window, const char *app_id);
++
+ const char *
+ window_get_title(struct window *window);
+
+--
+2.33.0
+