From 889cd9e0db5c22b02fa1a9a4951c8241f3bbabaf Mon Sep 17 00:00:00 2001 From: Roberto Ricci Date: Thu, 29 Apr 2021 10:19:09 +0200 Subject: [PATCH] sway: restore support for gtk-primary-selection This reverts https://github.com/swaywm/sway/commit/5ad3990a6c9beae44392e1962223623c0a4e3fa9 and fixes clipboard issues with Firefox ESR 78 --- srcpkgs/sway/patches/primary_selection.diff | 25 +++++++++++++++++++++ srcpkgs/sway/template | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/sway/patches/primary_selection.diff diff --git a/srcpkgs/sway/patches/primary_selection.diff b/srcpkgs/sway/patches/primary_selection.diff new file mode 100644 index 000000000000..e1f02fa0ee2c --- /dev/null +++ b/srcpkgs/sway/patches/primary_selection.diff @@ -0,0 +1,25 @@ +Sway 1.6 removed support for gtk-primary-selection, but some +programs (e.g. Firefox ESR 78) still rely on it. +Since wlroots will drop it in version 0.14, we can restore +this feature on sway. +https://github.com/swaywm/sway/pull/5788 +https://github.com/swaywm/wlroots/issues/2421 +https://github.com/swaywm/wlroots/pull/2460 +--- sway/server.c ++++ sway/server.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -75,6 +76,7 @@ bool server_init(struct sway_server *server) { + wlr_data_device_manager_create(server->wl_display); + + wlr_gamma_control_manager_v1_create(server->wl_display); ++ wlr_gtk_primary_selection_device_manager_create(server->wl_display); + + server->new_output.notify = handle_new_output; + wl_signal_add(&server->backend->events.new_output, &server->new_output); diff --git a/srcpkgs/sway/template b/srcpkgs/sway/template index 3297f668adf4..4a77658518e8 100644 --- a/srcpkgs/sway/template +++ b/srcpkgs/sway/template @@ -1,7 +1,7 @@ # Template file for 'sway' pkgname=sway version=1.6 -revision=1 +revision=2 build_style=meson configure_args="-Dwerror=false -Db_ndebug=false" conf_files="/etc/sway/config"