From 23054faaa6397da76a356c648c2619d5b07759d1 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Tue, 15 Mar 2022 03:52:43 +0100 Subject: [PATCH 1/4] d/patches: xdg-activation: Allow to submit tokens --- debian/patches/series | 1 + ...dg-activation-Allow-to-submit-tokens.patch | 58 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 debian/patches/upstream/xdg-activation-Allow-to-submit-tokens.patch diff --git a/debian/patches/series b/debian/patches/series index 5458f1149..0de9c232d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ pureos/Revert-layer-shell-error-on-0-dimension-without-anchors.patch upstream/xwayland-Allow-to-retrieve-_NET_STARTUP_ID.patch upstream/xwayland-Allow-to-retrieve-startup-id-via-_NET_STARTUP_IN.patch pureos/Revert-seat-use-WL_SEAT_ERROR_CAPABILITY.patch +upstream/xdg-activation-Allow-to-submit-tokens.patch diff --git a/debian/patches/upstream/xdg-activation-Allow-to-submit-tokens.patch b/debian/patches/upstream/xdg-activation-Allow-to-submit-tokens.patch new file mode 100644 index 000000000..5d60826bd --- /dev/null +++ b/debian/patches/upstream/xdg-activation-Allow-to-submit-tokens.patch @@ -0,0 +1,58 @@ +From c9cd3502ba6113070020de50e41f0af72e0f5031 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Guido=20G=C3=BCnther?= +Date: Thu, 11 Nov 2021 15:31:27 +0100 +Subject: xdg-activation: Allow to submit tokens + +Allows the compositor to submit tokens to the pool of +currently active tokens. This can be useful when the +launcher doesn't use or support xdg-activation-v1 by +itself - e.g. when it is X11 based or use gtk_shell1. +--- + include/wlr/types/wlr_xdg_activation_v1.h | 4 ++++ + types/wlr_xdg_activation_v1.c | 20 ++++++++++++++++++++ + 2 files changed, 24 insertions(+) + +diff --git a/include/wlr/types/wlr_xdg_activation_v1.h b/include/wlr/types/wlr_xdg_activation_v1.h +index 04558a08..9d1caa4e 100644 +--- a/include/wlr/types/wlr_xdg_activation_v1.h ++++ b/include/wlr/types/wlr_xdg_activation_v1.h +@@ -60,4 +60,8 @@ struct wlr_xdg_activation_v1_request_activate_event { + struct wlr_xdg_activation_v1 *wlr_xdg_activation_v1_create( + struct wl_display *display); + ++// Add a token to the pool of known tokens ++struct wlr_xdg_activation_token_v1 *wlr_xdg_activation_v1_add_token( ++ struct wlr_xdg_activation_v1 *activation, const char *token_str); ++ + #endif +diff --git a/types/wlr_xdg_activation_v1.c b/types/wlr_xdg_activation_v1.c +index 0f44aced..1e7d79fb 100644 +--- a/types/wlr_xdg_activation_v1.c ++++ b/types/wlr_xdg_activation_v1.c +@@ -348,3 +348,23 @@ struct wlr_xdg_activation_v1 *wlr_xdg_activation_v1_create( + + return activation; + } ++ ++struct wlr_xdg_activation_token_v1 *wlr_xdg_activation_v1_add_token( ++ struct wlr_xdg_activation_v1 *activation, const char *token_str) { ++ assert(token_str); ++ ++ struct wlr_xdg_activation_token_v1 *token = calloc(1, sizeof(*token)); ++ if (token == NULL) { ++ return NULL; ++ } ++ wl_list_init(&token->link); ++ wl_list_init(&token->seat_destroy.link); ++ wl_list_init(&token->surface_destroy.link); ++ ++ token->activation = activation; ++ token->token = strdup(token_str); ++ ++ wl_list_insert(&activation->tokens, &token->link); ++ ++ return token; ++} +-- +2.35.1 + -- GitLab From a3bdb50e518dcaee8ac9bf72ef73a74d7cb57462 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Tue, 15 Mar 2022 03:52:52 +0100 Subject: [PATCH 2/4] d/patches: wlr_output: Don't leak format --- debian/patches/series | 1 + .../wlr_output-Don-t-leak-format.patch | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 debian/patches/upstream/wlr_output-Don-t-leak-format.patch diff --git a/debian/patches/series b/debian/patches/series index 0de9c232d..080ad191c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ upstream/xwayland-Allow-to-retrieve-_NET_STARTUP_ID.patch upstream/xwayland-Allow-to-retrieve-startup-id-via-_NET_STARTUP_IN.patch pureos/Revert-seat-use-WL_SEAT_ERROR_CAPABILITY.patch upstream/xdg-activation-Allow-to-submit-tokens.patch +upstream/wlr_output-Don-t-leak-format.patch diff --git a/debian/patches/upstream/wlr_output-Don-t-leak-format.patch b/debian/patches/upstream/wlr_output-Don-t-leak-format.patch new file mode 100644 index 000000000..850aabbfa --- /dev/null +++ b/debian/patches/upstream/wlr_output-Don-t-leak-format.patch @@ -0,0 +1,26 @@ +From 81de0fa203c2f146c6d7da2803405f6d8856be93 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Guido=20G=C3=BCnther?= +Date: Thu, 17 Feb 2022 14:39:59 +0100 +Subject: wlr_output: Don't leak format + +This is basically 8634dd3e6ab9e629e18c973898c1a01835f4f925 +which is part of 0.15.0. +--- + types/wlr_output.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/types/wlr_output.c b/types/wlr_output.c +index c6676105..77c0f84e 100644 +--- a/types/wlr_output.c ++++ b/types/wlr_output.c +@@ -1262,6 +1262,7 @@ static struct wlr_buffer *render_cursor_buffer(struct wlr_output_cursor *cursor) + wlr_swapchain_destroy(output->cursor_swapchain); + output->cursor_swapchain = wlr_swapchain_create(allocator, + width, height, format); ++ free(format); + if (output->cursor_swapchain == NULL) { + wlr_log(WLR_ERROR, "Failed to create cursor swapchain"); + return NULL; +-- +2.35.1 + -- GitLab From c78bd353609515b1e9dd553cc13606275f45f35c Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Tue, 15 Mar 2022 03:53:10 +0100 Subject: [PATCH 3/4] d/patches: wlr_output_layout_contains_point: handle outputs that aren't in the layout --- debian/patches/series | 1 + ...t_contains_point-handle-outputs-that.patch | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 debian/patches/upstream/wlr_output_layout_contains_point-handle-outputs-that.patch diff --git a/debian/patches/series b/debian/patches/series index 080ad191c..436557422 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ upstream/xwayland-Allow-to-retrieve-startup-id-via-_NET_STARTUP_IN.patch pureos/Revert-seat-use-WL_SEAT_ERROR_CAPABILITY.patch upstream/xdg-activation-Allow-to-submit-tokens.patch upstream/wlr_output-Don-t-leak-format.patch +upstream/wlr_output_layout_contains_point-handle-outputs-that.patch diff --git a/debian/patches/upstream/wlr_output_layout_contains_point-handle-outputs-that.patch b/debian/patches/upstream/wlr_output_layout_contains_point-handle-outputs-that.patch new file mode 100644 index 000000000..6b9f77100 --- /dev/null +++ b/debian/patches/upstream/wlr_output_layout_contains_point-handle-outputs-that.patch @@ -0,0 +1,32 @@ +From d9d667512ef23df7d57eff755fdf6b6e06217dab Mon Sep 17 00:00:00 2001 +From: Sebastian Krzyszkowiak +Date: Sat, 5 Mar 2022 08:00:39 +0100 +Subject: wlr_output_layout_contains_point: handle outputs that + aren't in the layout + +Instead of crashing, return `false` when the specified output isn't part +of the layout, as we can be sure that it doesn't contain the specified +point. + +(cherry picked from commit 13fcdba75cf5f21cfd49c1a05f4fa62f77619b40) +--- + types/wlr_output_layout.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/types/wlr_output_layout.c b/types/wlr_output_layout.c +index 3286b8f8..fd18c8d4 100644 +--- a/types/wlr_output_layout.c ++++ b/types/wlr_output_layout.c +@@ -230,6 +230,9 @@ bool wlr_output_layout_contains_point(struct wlr_output_layout *layout, + if (reference) { + struct wlr_output_layout_output *l_output = + wlr_output_layout_get(layout, reference); ++ if (!l_output) { ++ return false; ++ } + struct wlr_box *box = output_layout_output_get_box(l_output); + return wlr_box_contains_point(box, lx, ly); + } else { +-- +2.35.1 + -- GitLab From c40373887745666b99901a848dea0d5fbcfb9794 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Tue, 15 Mar 2022 03:53:51 +0100 Subject: [PATCH 4/4] Document changes and release 0.14.1-5pureos2 into byzantium --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index d3524f386..6719b5cd2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +wlroots (0.14.1-5pureos2) byzantium; urgency=medium + + * [23054fa] d/patches: xdg-activation: Allow to submit tokens + * [a3bdb50] d/patches: wlr_output: Don't leak format + * [c78bd35] d/patches: wlr_output_layout_contains_point: handle outputs that aren't in the layout + + -- Sebastian Krzyszkowiak Tue, 15 Mar 2022 03:53:21 +0100 + wlroots (0.14.1-5pureos1) byzantium; urgency=medium * Upload to byzantium -- GitLab