Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (b37cd8b5cf49052a02f1b90337a2e2ef184f2f3b)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (b37cd8b5cf49052a02f1b90337a2e2ef184f2f3b)
  • Date: Sat, 7 Sep 2024 21:36:59 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

windowmanagers/sway/DEPENDS
| 5
windowmanagers/sway/DETAILS
| 1
windowmanagers/sway/HISTORY
| 19
windowmanagers/sway/patches/0001-Drop-wl_drm.patch
| 35

windowmanagers/sway/patches/0002-meson-bump-wlroots-version-after-0.17.0-release.patch
| 26
windowmanagers/sway/patches/0003-Chase-wlroots-4440.patch
| 198 ++++
windowmanagers/sway/patches/0004-Add-wlr-util-transform.h-includes.patch
| 64 +
windowmanagers/sway/patches/0005-Pass-wl_display-to-wlr_output_layout.patch
| 77 +
windowmanagers/sway/patches/0006-Chase-wlroots-4482.patch
| 40
windowmanagers/sway/patches/0007-Chase-wlroots-4003.patch
| 44 +
windowmanagers/sway/patches/0008-Chase-wlroots-4443.patch
| 35
windowmanagers/sway/patches/0009-Convert-to-new-pointer-enums.patch
| 410 ++++++++++

windowmanagers/sway/patches/0010-input-Rename-WLR_INPUT_DEVICE_TABLET_TOOL-to.patch
| 107 ++

windowmanagers/sway/patches/0011-Fetch-input-device-vendor-product-from-libinput.patch
| 63 +
windowmanagers/sway/patches/0012-Update-for-versioned-wlroots-files.patch
| 27

windowmanagers/sway/patches/0013-input-pass-wlr_seat_client-to-wlr_seat_touch_notify_cancel-.patch
| 31

windowmanagers/sway/patches/0014-server-Use-wlr_renderer_get_texture_formats.patch
| 31

windowmanagers/sway/patches/0015-protocols-use-tablet-v2-xml-from-stable-.patch
| 29
18 files changed, 1239 insertions(+), 3 deletions(-)

New commits:
commit b37cd8b5cf49052a02f1b90337a2e2ef184f2f3b
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

sway: Fix build against wlroots 0.18.0

diff --git a/windowmanagers/sway/DEPENDS b/windowmanagers/sway/DEPENDS
index 3f05265..46b4fd5 100755
--- a/windowmanagers/sway/DEPENDS
+++ b/windowmanagers/sway/DEPENDS
@@ -9,17 +9,16 @@ depends DEVICE-MANAGER &&
depends cairo &&
depends pango &&
depends pcre2 &&
-vdepends <<!
+vdepends <<! &&
NINJA-BUILD
json-c >= 0.13
libinput >= 1.6.0
meson >= 0.60.0
wayland >= 1.20.0
wayland-protocols >= 1.24
+ wlroots[SWAY] >= 0.18.0
!

-depends -sub "SWAY" wlroots &&
-
optional_depends gdk-pixbuf2 \
"" \
"" \
diff --git a/windowmanagers/sway/DETAILS b/windowmanagers/sway/DETAILS
index 76a5eab..052373e 100755
--- a/windowmanagers/sway/DETAILS
+++ b/windowmanagers/sway/DETAILS
@@ -11,6 +11,7 @@ if [[ "${SWAY_BRANCH}" == "scm" ]]; then
SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-git"
else
VERSION=1.9
+ PATCHLEVEL=1
SOURCE="${SPELL}-${VERSION}.tar.gz"
SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"

SOURCE_URL[0]="https://github.com/swaywm/sway/releases/download/$VERSION/$SOURCE";
diff --git a/windowmanagers/sway/HISTORY b/windowmanagers/sway/HISTORY
index 33a4d34..0a63512 100644
--- a/windowmanagers/sway/HISTORY
+++ b/windowmanagers/sway/HISTORY
@@ -1,3 +1,22 @@
+2024-09-07 Ismael Luceno <ismael AT sourcemage.org>
+ * DEPENDS, patches/0001-Drop-wl_drm.patch,
+ patches/0002-meson-bump-wlroots-version-after-0.17.0-release.patch,
+ patches/0003-Chase-wlroots-4440.patch,
+ patches/0004-Add-wlr-util-transform.h-includes.patch,
+ patches/0005-Pass-wl_display-to-wlr_output_layout.patch,
+ patches/0006-Chase-wlroots-4482.patch,
+ patches/0007-Chase-wlroots-4003.patch,
+ patches/0008-Chase-wlroots-4443.patch,
+ patches/0009-Convert-to-new-pointer-enums.patch,
+ patches/0010-input-Rename-WLR_INPUT_DEVICE_TABLET_TOOL-to.patch,
+ patches/0011-Fetch-input-device-vendor-product-from-libinput.patch,
+ patches/0012-Update-for-versioned-wlroots-files.patch,
+
patches/0013-input-pass-wlr_seat_client-to-wlr_seat_touch_notify_cancel-.patch,
+ patches/0014-server-Use-wlr_renderer_get_texture_formats.patch,
+ patches/0015-protocols-use-tablet-v2-xml-from-stable-.patch:
+ fixed build against wlroots 1.18.x
+ * DETAILS: PATCHLEVEL++
+
2024-02-24 Treeve Jelbert <treeve AT sourcemage.org>
* DETAILS: version 1.9

diff --git a/windowmanagers/sway/patches/0001-Drop-wl_drm.patch
b/windowmanagers/sway/patches/0001-Drop-wl_drm.patch
new file mode 100644
index 0000000..9e063ab
--- /dev/null
+++ b/windowmanagers/sway/patches/0001-Drop-wl_drm.patch
@@ -0,0 +1,35 @@
+From 7e69a7076fc8a4eb788e0229b1c99dd0b7b04bb7 Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact AT emersion.fr>
+Date: Wed, 18 Oct 2023 14:55:26 +0200
+Subject: [PATCH 1/15] Drop wl_drm
+
+See https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4397
+
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ sway/server.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/sway/server.c b/sway/server.c
+index 69a9f27ee9a7..e34ea2ff37c4 100644
+--- a/sway/server.c
++++ b/sway/server.c
+@@ -13,7 +13,6 @@
+ #include <wlr/types/wlr_content_type_v1.h>
+ #include <wlr/types/wlr_cursor_shape_v1.h>
+ #include <wlr/types/wlr_data_control_v1.h>
+-#include <wlr/types/wlr_drm.h>
+ #include <wlr/types/wlr_export_dmabuf_v1.h>
+ #include <wlr/types/wlr_fractional_scale_v1.h>
+ #include <wlr/types/wlr_gamma_control_v1.h>
+@@ -178,7 +177,6 @@ bool server_init(struct sway_server *server) {
+ wlr_renderer_init_wl_shm(server->renderer, server->wl_display);
+
+ if (wlr_renderer_get_dmabuf_texture_formats(server->renderer) !=
NULL) {
+- wlr_drm_create(server->wl_display, server->renderer);
+ server->linux_dmabuf_v1 =
wlr_linux_dmabuf_v1_create_with_renderer(
+ server->wl_display, 4, server->renderer);
+ }
+--
+2.46.0
+
diff --git
a/windowmanagers/sway/patches/0002-meson-bump-wlroots-version-after-0.17.0-release.patch

b/windowmanagers/sway/patches/0002-meson-bump-wlroots-version-after-0.17.0-release.patch
new file mode 100644
index 0000000..e022354
--- /dev/null
+++
b/windowmanagers/sway/patches/0002-meson-bump-wlroots-version-after-0.17.0-release.patch
@@ -0,0 +1,26 @@
+From 4ad15a4015feef2ecfba311c13e64e3976cc611c Mon Sep 17 00:00:00 2001
+From: llyyr <llyyr.public AT gmail.com>
+Date: Tue, 21 Nov 2023 23:55:19 +0530
+Subject: [PATCH 2/15] meson: bump wlroots version after 0.17.0 release
+
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index eeee39cde85b..adf49c196c19 100644
+--- a/meson.build
++++ b/meson.build
+@@ -37,7 +37,7 @@ if is_freebsd
+ endif
+
+ # Execute the wlroots subproject, if any
+-wlroots_version = ['>=0.17.0', '<0.18.0']
++wlroots_version = ['>=0.18.0', '<0.19.0']
+ subproject(
+ 'wlroots',
+ default_options: ['examples=false'],
+--
+2.46.0
+
diff --git a/windowmanagers/sway/patches/0003-Chase-wlroots-4440.patch
b/windowmanagers/sway/patches/0003-Chase-wlroots-4440.patch
new file mode 100644
index 0000000..2907c4e
--- /dev/null
+++ b/windowmanagers/sway/patches/0003-Chase-wlroots-4440.patch
@@ -0,0 +1,198 @@
+From a946b1aecfa3f32a3bfae66d66df0bdf77440d69 Mon Sep 17 00:00:00 2001
+From: llyyr <llyyr.public AT gmail.com>
+Date: Wed, 22 Nov 2023 00:05:03 +0530
+Subject: [PATCH 3/15] Chase wlroots!4440
+
+References:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4440
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ include/sway/input/input-manager.h | 2 -
+ protocols/meson.build | 1 -
+ protocols/wlr-input-inhibitor-unstable-v1.xml | 67 -------------------
+ sway/input/input-manager.c | 37 ----------
+ sway/server.c | 1 -
+ 5 files changed, 108 deletions(-)
+ delete mode 100644 protocols/wlr-input-inhibitor-unstable-v1.xml
+
+diff --git a/include/sway/input/input-manager.h
b/include/sway/input/input-manager.h
+index 4bd5170931dc..145edd4b6eb2 100644
+--- a/include/sway/input/input-manager.h
++++ b/include/sway/input/input-manager.h
+@@ -1,7 +1,6 @@
+ #ifndef _SWAY_INPUT_INPUT_MANAGER_H
+ #define _SWAY_INPUT_INPUT_MANAGER_H
+ #include <libinput.h>
+-#include <wlr/types/wlr_input_inhibitor.h>
+ #include <wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h>
+ #include <wlr/types/wlr_virtual_keyboard_v1.h>
+ #include <wlr/types/wlr_virtual_pointer_v1.h>
+@@ -21,7 +20,6 @@ struct sway_input_manager {
+ struct wl_list devices;
+ struct wl_list seats;
+
+- struct wlr_input_inhibit_manager *inhibit;
+ struct wlr_keyboard_shortcuts_inhibit_manager_v1
*keyboard_shortcuts_inhibit;
+ struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard;
+ struct wlr_virtual_pointer_manager_v1 *virtual_pointer;
+diff --git a/protocols/meson.build b/protocols/meson.build
+index 2992ac58519e..81edb5841b23 100644
+--- a/protocols/meson.build
++++ b/protocols/meson.build
+@@ -16,7 +16,6 @@ protocols = [
+ wl_protocol_dir / 'staging/cursor-shape/cursor-shape-v1.xml',
+ 'wlr-layer-shell-unstable-v1.xml',
+ 'idle.xml',
+- 'wlr-input-inhibitor-unstable-v1.xml',
+ 'wlr-output-power-management-unstable-v1.xml',
+ ]
+
+diff --git a/protocols/wlr-input-inhibitor-unstable-v1.xml
b/protocols/wlr-input-inhibitor-unstable-v1.xml
+deleted file mode 100644
+index b62d1bb440a5..000000000000
+--- a/protocols/wlr-input-inhibitor-unstable-v1.xml
++++ /dev/null
+@@ -1,67 +0,0 @@
+-<?xml version="1.0" encoding="UTF-8"?>
+-<protocol name="wlr_input_inhibit_unstable_v1">
+- <copyright>
+- Copyright © 2018 Drew DeVault
+-
+- Permission to use, copy, modify, distribute, and sell this
+- software and its documentation for any purpose is hereby granted
+- without fee, provided that the above copyright notice appear in
+- all copies and that both that copyright notice and this permission
+- notice appear in supporting documentation, and that the name of
+- the copyright holders not be used in advertising or publicity
+- pertaining to distribution of the software without specific,
+- written prior permission. The copyright holders make no
+- representations about the suitability of this software for any
+- purpose. It is provided "as is" without express or implied
+- warranty.
+-
+- THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+- FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+- SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+- AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+- ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+- THIS SOFTWARE.
+- </copyright>
+-
+- <interface name="zwlr_input_inhibit_manager_v1" version="1">
+- <description summary="inhibits input events to other clients">
+- Clients can use this interface to prevent input events from being
sent to
+- any surfaces but its own, which is useful for example in lock screen
+- software. It is assumed that access to this interface will be locked
down
+- to whitelisted clients by the compositor.
+- </description>
+-
+- <request name="get_inhibitor">
+- <description summary="inhibit input to other clients">
+- Activates the input inhibitor. As long as the inhibitor is active,
the
+- compositor will not send input events to other clients.
+- </description>
+- <arg name="id" type="new_id" interface="zwlr_input_inhibitor_v1"/>
+- </request>
+-
+- <enum name="error">
+- <entry name="already_inhibited" value="0" summary="an input inhibitor
is already in use on the compositor"/>
+- </enum>
+- </interface>
+-
+- <interface name="zwlr_input_inhibitor_v1" version="1">
+- <description summary="inhibits input to other clients">
+- While this resource exists, input to clients other than the owner of
the
+- inhibitor resource will not receive input events. The client that owns
+- this resource will receive all input events normally. The compositor
will
+- also disable all of its own input processing (such as keyboard
shortcuts)
+- while the inhibitor is active.
+-
+- The compositor may continue to send input events to selected clients,
+- such as an on-screen keyboard (via the input-method protocol).
+- </description>
+-
+- <request name="destroy" type="destructor">
+- <description summary="destroy the input inhibitor object">
+- Destroy the inhibitor and allow other clients to receive input.
+- </description>
+- </request>
+- </interface>
+-</protocol>
+diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
+index dcaeb056ecef..4febc333426f 100644
+--- a/sway/input/input-manager.c
++++ b/sway/input/input-manager.c
+@@ -6,7 +6,6 @@
+ #include <wlr/config.h>
+ #include <wlr/types/wlr_cursor.h>
+ #include <wlr/types/wlr_keyboard_group.h>
+-#include <wlr/types/wlr_input_inhibitor.h>
+ #include <wlr/types/wlr_virtual_keyboard_v1.h>
+ #include <wlr/types/wlr_virtual_pointer_v1.h>
+ #include "sway/config.h"
+@@ -284,34 +283,6 @@ static void handle_new_input(struct wl_listener
*listener, void *data) {
+ }
+ }
+
+-static void handle_inhibit_activate(struct wl_listener *listener, void
*data) {
+- struct sway_input_manager *input_manager = wl_container_of(
+- listener, input_manager, inhibit_activate);
+- struct sway_seat *seat;
+- wl_list_for_each(seat, &input_manager->seats, link) {
+- seat_set_exclusive_client(seat,
input_manager->inhibit->active_client);
+- }
+-}
+-
+-static void handle_inhibit_deactivate(struct wl_listener *listener, void
*data) {
+- struct sway_input_manager *input_manager = wl_container_of(
+- listener, input_manager, inhibit_deactivate);
+- struct sway_seat *seat;
+- if (server.session_lock.locked) {
+- // Don't deactivate the grab of a screenlocker
+- return;
+- }
+- wl_list_for_each(seat, &input_manager->seats, link) {
+- seat_set_exclusive_client(seat, NULL);
+- struct sway_node *previous = seat_get_focus(seat);
+- if (previous) {
+- // Hack to get seat to re-focus the return value of
get_focus
+- seat_set_focus(seat, NULL);
+- seat_set_focus(seat, previous);
+- }
+- }
+-}
+-
+ static void handle_keyboard_shortcuts_inhibitor_destroy(
+ struct wl_listener *listener, void *data) {
+ struct sway_keyboard_shortcuts_inhibitor *sway_inhibitor =
+@@ -480,14 +451,6 @@ struct sway_input_manager *input_manager_create(struct
sway_server *server) {
+ &input->virtual_pointer_new);
+ input->virtual_pointer_new.notify = handle_virtual_pointer;
+
+- input->inhibit = wlr_input_inhibit_manager_create(server->wl_display);
+- input->inhibit_activate.notify = handle_inhibit_activate;
+- wl_signal_add(&input->inhibit->events.activate,
+- &input->inhibit_activate);
+- input->inhibit_deactivate.notify = handle_inhibit_deactivate;
+- wl_signal_add(&input->inhibit->events.deactivate,
+- &input->inhibit_deactivate);
+-
+ input->keyboard_shortcuts_inhibit =
+ wlr_keyboard_shortcuts_inhibit_v1_create(server->wl_display);
+ input->keyboard_shortcuts_inhibit_new_inhibitor.notify =
+diff --git a/sway/server.c b/sway/server.c
+index 217c9ac940ac..de70e0abc682 100644
+--- a/sway/server.c
++++ b/sway/server.c
+@@ -87,7 +87,6 @@ static bool is_privileged(const struct wl_global *global) {
+ global == server.gamma_control_manager_v1->global ||
+ global == server.layer_shell->global ||
+ global == server.session_lock.manager->global ||
+- global == server.input->inhibit->global ||
+ global == server.input->keyboard_shortcuts_inhibit->global ||
+ global == server.input->virtual_keyboard->global ||
+ global == server.input->virtual_pointer->global;
+--
+2.46.0
+
diff --git
a/windowmanagers/sway/patches/0004-Add-wlr-util-transform.h-includes.patch
b/windowmanagers/sway/patches/0004-Add-wlr-util-transform.h-includes.patch
new file mode 100644
index 0000000..61085a8
--- /dev/null
+++ b/windowmanagers/sway/patches/0004-Add-wlr-util-transform.h-includes.patch
@@ -0,0 +1,64 @@
+From fd6d6f1d97deea2fc94aaeb58c85c99a498d905b Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact AT emersion.fr>
+Date: Thu, 23 Nov 2023 13:08:09 +0100
+Subject: [PATCH 4/15] Add wlr/util/transform.h includes
+
+References:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4097
+Closes: https://github.com/swaywm/sway/issues/7830
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ sway/commands/output/transform.c | 1 +
+ sway/desktop/output.c | 1 +
+ sway/desktop/render.c | 1 +
+ sway/tree/root.c | 1 +
+ 4 files changed, 4 insertions(+)
+
+diff --git a/sway/commands/output/transform.c
b/sway/commands/output/transform.c
+index f4fcc8c99a24..8db71bb30b4f 100644
+--- a/sway/commands/output/transform.c
++++ b/sway/commands/output/transform.c
+@@ -1,4 +1,5 @@
+ #include <string.h>
++#include <wlr/util/transform.h>
+ #include "sway/commands.h"
+ #include "sway/config.h"
+ #include "log.h"
+diff --git a/sway/desktop/output.c b/sway/desktop/output.c
+index e02ab32d0ded..d9328701c98a 100644
+--- a/sway/desktop/output.c
++++ b/sway/desktop/output.c
+@@ -16,6 +16,7 @@
+ #include <wlr/types/wlr_presentation_time.h>
+ #include <wlr/types/wlr_compositor.h>
+ #include <wlr/util/region.h>
++#include <wlr/util/transform.h>
+ #include "config.h"
+ #include "log.h"
+ #include "sway/config.h"
+diff --git a/sway/desktop/render.c b/sway/desktop/render.c
+index c4c0004e77cd..9cfdea842f06 100644
+--- a/sway/desktop/render.c
++++ b/sway/desktop/render.c
+@@ -13,6 +13,7 @@
+ #include <wlr/types/wlr_output.h>
+ #include <wlr/types/wlr_compositor.h>
+ #include <wlr/util/region.h>
++#include <wlr/util/transform.h>
+ #include "log.h"
+ #include "config.h"
+ #include "sway/config.h"
+diff --git a/sway/tree/root.c b/sway/tree/root.c
+index 831c75a588d9..66008d30d09e 100644
+--- a/sway/tree/root.c
++++ b/sway/tree/root.c
+@@ -3,6 +3,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <wlr/types/wlr_output_layout.h>
++#include <wlr/util/transform.h>
+ #include "sway/desktop/transaction.h"
+ #include "sway/input/seat.h"
+ #include "sway/ipc-server.h"
+--
+2.46.0
+
diff --git
a/windowmanagers/sway/patches/0005-Pass-wl_display-to-wlr_output_layout.patch
b/windowmanagers/sway/patches/0005-Pass-wl_display-to-wlr_output_layout.patch
new file mode 100644
index 0000000..7fc4b89
--- /dev/null
+++
b/windowmanagers/sway/patches/0005-Pass-wl_display-to-wlr_output_layout.patch
@@ -0,0 +1,77 @@
+From 128b6253a924c30e8e4fd1f09ce19e21a826c5ad Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact AT emersion.fr>
+Date: Thu, 23 Nov 2023 13:08:53 +0100
+Subject: [PATCH 5/15] Pass wl_display to wlr_output_layout
+
+References:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4310
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ include/sway/tree/root.h | 2 +-
+ sway/main.c | 2 --
+ sway/server.c | 2 ++
+ sway/tree/root.c | 4 ++--
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h
+index a2c088e76841..b3dda12f94e0 100644
+--- a/include/sway/tree/root.h
++++ b/include/sway/tree/root.h
+@@ -41,7 +41,7 @@ struct sway_root {
+ } events;
+ };
+
+-struct sway_root *root_create(void);
++struct sway_root *root_create(struct wl_display *display);
+
+ void root_destroy(struct sway_root *root);
+
+diff --git a/sway/main.c b/sway/main.c
+index 85bc2f1c9658..23689757e0a2 100644
+--- a/sway/main.c
++++ b/sway/main.c
+@@ -375,8 +375,6 @@ int main(int argc, char **argv) {
+
+ sway_log(SWAY_INFO, "Starting sway version " SWAY_VERSION);
+
+- root = root_create();
+-
+ if (!server_init(&server)) {
+ return 1;
+ }
+diff --git a/sway/server.c b/sway/server.c
+index de70e0abc682..e4f8a7c8ca67 100644
+--- a/sway/server.c
++++ b/sway/server.c
+@@ -120,6 +120,8 @@ bool server_init(struct sway_server *server) {
+
+ wl_display_set_global_filter(server->wl_display, filter_global, NULL);
+
++ root = root_create(server->wl_display);
++
+ server->backend = wlr_backend_autocreate(server->wl_display,
&server->session);
+ if (!server->backend) {
+ sway_log(SWAY_ERROR, "Unable to create backend");
+diff --git a/sway/tree/root.c b/sway/tree/root.c
+index 66008d30d09e..478df00cb187 100644
+--- a/sway/tree/root.c
++++ b/sway/tree/root.c
+@@ -24,14 +24,14 @@ static void output_layout_handle_change(struct
wl_listener *listener,
+ transaction_commit_dirty();
+ }
+
+-struct sway_root *root_create(void) {
++struct sway_root *root_create(struct wl_display *wl_display) {
+ struct sway_root *root = calloc(1, sizeof(struct sway_root));
+ if (!root) {
+ sway_log(SWAY_ERROR, "Unable to allocate sway_root");
+ return NULL;
+ }
+ node_init(&root->node, N_ROOT, root);
+- root->output_layout = wlr_output_layout_create();
++ root->output_layout = wlr_output_layout_create(wl_display);
+ wl_list_init(&root->all_outputs);
+ #if HAVE_XWAYLAND
+ wl_list_init(&root->xwayland_unmanaged);
+--
+2.46.0
+
diff --git a/windowmanagers/sway/patches/0006-Chase-wlroots-4482.patch
b/windowmanagers/sway/patches/0006-Chase-wlroots-4482.patch
new file mode 100644
index 0000000..a0c320a
--- /dev/null
+++ b/windowmanagers/sway/patches/0006-Chase-wlroots-4482.patch
@@ -0,0 +1,40 @@
+From 64d644f0da15e4aef85ca1800b90aa65e333933c Mon Sep 17 00:00:00 2001
+From: Bill Li <billli11hkb AT gmail.com>
+Date: Thu, 28 Dec 2023 03:33:53 +0800
+Subject: [PATCH 6/15] Chase wlroots!4482
+
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ sway/desktop/output.c | 2 +-
+ sway/desktop/render.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sway/desktop/output.c b/sway/desktop/output.c
+index d525b2b4b877..8b84da8692e1 100644
+--- a/sway/desktop/output.c
++++ b/sway/desktop/output.c
+@@ -531,7 +531,7 @@ static bool scan_out_fullscreen_view(struct sway_output
*output,
+ return false;
+ }
+
+- wlr_presentation_surface_scanned_out_on_output(server.presentation,
surface,
++ wlr_presentation_surface_scanned_out_on_output(surface,
+ wlr_output);
+
+ return wlr_output_commit_state(wlr_output, pending);
+diff --git a/sway/desktop/render.c b/sway/desktop/render.c
+index 9cfdea842f06..c9a306cfea88 100644
+--- a/sway/desktop/render.c
++++ b/sway/desktop/render.c
+@@ -151,7 +151,7 @@ static void render_surface_iterator(struct sway_output
*output,
+ render_texture(data->ctx, texture,
+ &src_box, &dst_box, &clip_box, surface->current.transform,
alpha);
+
+- wlr_presentation_surface_textured_on_output(server.presentation,
surface,
++ wlr_presentation_surface_textured_on_output(surface,
+ wlr_output);
+ }
+
+--
+2.46.0
+
diff --git a/windowmanagers/sway/patches/0007-Chase-wlroots-4003.patch
b/windowmanagers/sway/patches/0007-Chase-wlroots-4003.patch
new file mode 100644
index 0000000..6ff1c4b
--- /dev/null
+++ b/windowmanagers/sway/patches/0007-Chase-wlroots-4003.patch
@@ -0,0 +1,44 @@
+From a4e85332a1fe6b079c6da1689ca33d8ba4c71977 Mon Sep 17 00:00:00 2001
+From: Kirill Primak <vyivel AT eclair.cafe>
+Date: Mon, 22 Jan 2024 21:24:41 +0300
+Subject: [PATCH 7/15] Chase wlroots!4003
+
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ sway/input/seatop_default.c | 5 +++--
+ sway/input/seatop_down.c | 3 ++-
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c
+index 0f4d03850b27..c56330fd90ef 100644
+--- a/sway/input/seatop_default.c
++++ b/sway/input/seatop_default.c
+@@ -796,8 +796,9 @@ static void handle_pointer_axis(struct sway_seat *seat,
+
+ if (!handled) {
+ wlr_seat_pointer_notify_axis(cursor->seat->wlr_seat,
event->time_msec,
+- event->orientation, scroll_factor * event->delta,
+- roundf(scroll_factor * event->delta_discrete),
event->source);
++ event->orientation, scroll_factor * event->delta,
++ roundf(scroll_factor * event->delta_discrete),
event->source,
++ event->relative_direction);
+ }
+ }
+
+diff --git a/sway/input/seatop_down.c b/sway/input/seatop_down.c
+index 36f9bb608a33..b4421fe6ad0a 100644
+--- a/sway/input/seatop_down.c
++++ b/sway/input/seatop_down.c
+@@ -137,7 +137,8 @@ static void handle_pointer_axis(struct sway_seat *seat,
+
+ wlr_seat_pointer_notify_axis(seat->wlr_seat, event->time_msec,
+ event->orientation, scroll_factor * event->delta,
+- roundf(scroll_factor * event->delta_discrete), event->source);
++ roundf(scroll_factor * event->delta_discrete), event->source,
++ event->relative_direction);
+ }
+
+ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
+--
+2.46.0
+
diff --git a/windowmanagers/sway/patches/0008-Chase-wlroots-4443.patch
b/windowmanagers/sway/patches/0008-Chase-wlroots-4443.patch
new file mode 100644
index 0000000..7ff7475
--- /dev/null
+++ b/windowmanagers/sway/patches/0008-Chase-wlroots-4443.patch
@@ -0,0 +1,35 @@
+From f202bc84d2c072ae39fc4e8a350a8b0a616f350b Mon Sep 17 00:00:00 2001
+From: Kirill Primak <vyivel AT eclair.cafe>
+Date: Thu, 25 Jan 2024 18:10:50 +0300
+Subject: [PATCH 8/15] Chase wlroots!4443
+
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ sway/server.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sway/server.c b/sway/server.c
+index 73bf9d70eb6f..cc20e89d7c05 100644
+--- a/sway/server.c
++++ b/sway/server.c
+@@ -172,7 +172,7 @@ bool server_init(struct sway_server *server) {
+
+ root = root_create(server->wl_display);
+
+- server->backend = wlr_backend_autocreate(server->wl_display,
&server->session);
++ server->backend = wlr_backend_autocreate(server->wl_event_loop,
&server->session);
+ if (!server->backend) {
+ sway_log(SWAY_ERROR, "Unable to create backend");
+ return false;
+@@ -355,7 +355,7 @@ bool server_init(struct sway_server *server) {
+ return false;
+ }
+
+- server->headless_backend =
wlr_headless_backend_create(server->wl_display);
++ server->headless_backend =
wlr_headless_backend_create(server->wl_event_loop);
+ if (!server->headless_backend) {
+ sway_log(SWAY_ERROR, "Failed to create secondary headless
backend");
+ wlr_backend_destroy(server->backend);
+--
+2.46.0
+
diff --git
a/windowmanagers/sway/patches/0009-Convert-to-new-pointer-enums.patch
b/windowmanagers/sway/patches/0009-Convert-to-new-pointer-enums.patch
new file mode 100644
index 0000000..e94a31c
--- /dev/null
+++ b/windowmanagers/sway/patches/0009-Convert-to-new-pointer-enums.patch
@@ -0,0 +1,410 @@
+From fca8474e9bd64bff8df16fdaf409d5f575ba9501 Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact AT emersion.fr>
+Date: Wed, 28 Feb 2024 17:49:58 +0100
+Subject: [PATCH 9/15] Convert to new pointer enums
+
+References:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4575
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ include/sway/input/cursor.h | 2 +-
+ include/sway/input/seat.h | 6 ++---
+ sway/commands/seat/cursor.c | 14 ++++++------
+ sway/input/cursor.c | 16 +++++++-------
+ sway/input/seat.c | 4 ++--
+ sway/input/seatop_default.c | 34 ++++++++++++++---------------
+ sway/input/seatop_down.c | 2 +-
+ sway/input/seatop_move_floating.c | 2 +-
+ sway/input/seatop_move_tiling.c | 2 +-
+ sway/input/seatop_resize_floating.c | 2 +-
+ sway/input/seatop_resize_tiling.c | 2 +-
+ 11 files changed, 43 insertions(+), 43 deletions(-)
+
+diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h
+index 1e21c66fe326..527d03500c70 100644
+--- a/include/sway/input/cursor.h
++++ b/include/sway/input/cursor.h
+@@ -114,7 +114,7 @@ void pointer_motion(struct sway_cursor *cursor, uint32_t
time_msec,
+
+ void dispatch_cursor_button(struct sway_cursor *cursor,
+ struct wlr_input_device *device, uint32_t time_msec, uint32_t button,
+- enum wlr_button_state state);
++ enum wl_pointer_button_state state);
+
+ void dispatch_cursor_axis(struct sway_cursor *cursor,
+ struct wlr_pointer_axis_event *event);
+diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
+index e5aa847837ec..475753d8a9f0 100644
+--- a/include/sway/input/seat.h
++++ b/include/sway/input/seat.h
+@@ -17,7 +17,7 @@ struct sway_seat;
+ struct sway_seatop_impl {
+ void (*button)(struct sway_seat *seat, uint32_t time_msec,
+ struct wlr_input_device *device, uint32_t button,
+- enum wlr_button_state state);
++ enum wl_pointer_button_state state);
+ void (*pointer_motion)(struct sway_seat *seat, uint32_t time_msec);
+ void (*pointer_axis)(struct sway_seat *seat,
+ struct wlr_pointer_axis_event *event);
+@@ -286,13 +286,13 @@ struct sway_container
*seat_get_focus_inactive_floating(struct sway_seat *seat,
+ struct sway_workspace *workspace);
+
+ void seat_pointer_notify_button(struct sway_seat *seat, uint32_t time_msec,
+- uint32_t button, enum wlr_button_state state);
++ uint32_t button, enum wl_pointer_button_state state);
+
+ void seat_consider_warp_to_focus(struct sway_seat *seat);
+
+ void seatop_button(struct sway_seat *seat, uint32_t time_msec,
+ struct wlr_input_device *device, uint32_t button,
+- enum wlr_button_state state);
++ enum wl_pointer_button_state state);
+
+ void seatop_pointer_motion(struct sway_seat *seat, uint32_t time_msec);
+
+diff --git a/sway/commands/seat/cursor.c b/sway/commands/seat/cursor.c
+index 85c5edcadb8a..df7c379d1089 100644
+--- a/sway/commands/seat/cursor.c
++++ b/sway/commands/seat/cursor.c
+@@ -84,12 +84,12 @@ struct cmd_results *seat_cmd_cursor(int argc, char
**argv) {
+
+ static struct cmd_results *press_or_release(struct sway_cursor *cursor,
+ char *action, char *button_str) {
+- enum wlr_button_state state;
++ enum wl_pointer_button_state state;
+ uint32_t button;
+ if (strcasecmp(action, "press") == 0) {
+- state = WLR_BUTTON_PRESSED;
++ state = WL_POINTER_BUTTON_STATE_PRESSED;
+ } else if (strcasecmp(action, "release") == 0) {
+- state = WLR_BUTTON_RELEASED;
++ state = WL_POINTER_BUTTON_STATE_RELEASED;
+ } else {
+ return cmd_results_new(CMD_INVALID, "%s", expected_syntax);
+ }
+@@ -104,16 +104,16 @@ static struct cmd_results *press_or_release(struct
sway_cursor *cursor,
+ } else if (button == SWAY_SCROLL_UP || button == SWAY_SCROLL_DOWN
+ || button == SWAY_SCROLL_LEFT || button ==
SWAY_SCROLL_RIGHT) {
+ // Dispatch axis event
+- enum wlr_axis_orientation orientation =
++ enum wl_pointer_axis orientation =
+ (button == SWAY_SCROLL_UP || button ==
SWAY_SCROLL_DOWN)
+- ? WLR_AXIS_ORIENTATION_VERTICAL
+- : WLR_AXIS_ORIENTATION_HORIZONTAL;
++ ? WL_POINTER_AXIS_VERTICAL_SCROLL
++ : WL_POINTER_AXIS_HORIZONTAL_SCROLL;
+ double delta = (button == SWAY_SCROLL_UP || button ==
SWAY_SCROLL_LEFT)
+ ? -1 : 1;
+ struct wlr_pointer_axis_event event = {
+ .pointer = NULL,
+ .time_msec = 0,
+- .source = WLR_AXIS_SOURCE_WHEEL,
++ .source = WL_POINTER_AXIS_SOURCE_WHEEL,
+ .orientation = orientation,
+ .delta = delta * 15,
+ .delta_discrete = delta
+diff --git a/sway/input/cursor.c b/sway/input/cursor.c
+index e8cd8112232c..7d66a89d98bd 100644
+--- a/sway/input/cursor.c
++++ b/sway/input/cursor.c
+@@ -356,7 +356,7 @@ static void handle_pointer_motion_absolute(
+
+ void dispatch_cursor_button(struct sway_cursor *cursor,
+ struct wlr_input_device *device, uint32_t time_msec, uint32_t
button,
+- enum wlr_button_state state) {
++ enum wl_pointer_button_state state) {
+ if (time_msec == 0) {
+ time_msec = get_current_time_msec();
+ }
+@@ -368,7 +368,7 @@ static void handle_pointer_button(struct wl_listener
*listener, void *data) {
+ struct sway_cursor *cursor = wl_container_of(listener, cursor,
button);
+ struct wlr_pointer_button_event *event = data;
+
+- if (event->state == WLR_BUTTON_PRESSED) {
++ if (event->state == WL_POINTER_BUTTON_STATE_PRESSED) {
+ cursor->pressed_button_count++;
+ } else {
+ if (cursor->pressed_button_count > 0) {
+@@ -430,7 +430,7 @@ static void handle_touch_up(struct wl_listener
*listener, void *data) {
+ if (cursor->pointer_touch_id == cursor->seat->touch_id) {
+ cursor->pointer_touch_up = true;
+ dispatch_cursor_button(cursor, &event->touch->base,
+- event->time_msec, BTN_LEFT,
WLR_BUTTON_RELEASED);
++ event->time_msec, BTN_LEFT,
WL_POINTER_BUTTON_STATE_RELEASED);
+ }
+ } else {
+ seatop_touch_up(seat, event);
+@@ -448,7 +448,7 @@ static void handle_touch_cancel(struct wl_listener
*listener, void *data) {
+ if (cursor->pointer_touch_id == cursor->seat->touch_id) {
+ cursor->pointer_touch_up = true;
+ dispatch_cursor_button(cursor, &event->touch->base,
+- event->time_msec, BTN_LEFT,
WLR_BUTTON_RELEASED);
++ event->time_msec, BTN_LEFT,
WL_POINTER_BUTTON_STATE_RELEASED);
+ }
+ } else {
+ seatop_touch_cancel(seat, event);
+@@ -661,7 +661,7 @@ static void handle_tool_tip(struct wl_listener
*listener, void *data) {
+ event->state == WLR_TABLET_TOOL_TIP_UP) {
+ cursor->simulating_pointer_from_tool_tip = false;
+ dispatch_cursor_button(cursor, &event->tablet->base,
event->time_msec,
+- BTN_LEFT, WLR_BUTTON_RELEASED);
++ BTN_LEFT, WL_POINTER_BUTTON_STATE_RELEASED);
+ wlr_seat_pointer_notify_frame(cursor->seat->wlr_seat);
+ } else if (!surface || !wlr_surface_accepts_tablet_v2(tablet_v2,
surface)) {
+ // If we started holding the tool tip down on a surface that
accepts
+@@ -673,7 +673,7 @@ static void handle_tool_tip(struct wl_listener
*listener, void *data) {
+ } else {
+ cursor->simulating_pointer_from_tool_tip = true;
+ dispatch_cursor_button(cursor, &event->tablet->base,
+- event->time_msec, BTN_LEFT,
WLR_BUTTON_PRESSED);
++ event->time_msec, BTN_LEFT,
WL_POINTER_BUTTON_STATE_PRESSED);
+ wlr_seat_pointer_notify_frame(cursor->seat->wlr_seat);
+ }
+ } else {
+@@ -776,13 +776,13 @@ static void handle_tool_button(struct wl_listener
*listener, void *data) {
+ case WLR_BUTTON_PRESSED:
+ if (cursor->tool_buttons == 0) {
+ dispatch_cursor_button(cursor,
&event->tablet->base,
+- event->time_msec, BTN_RIGHT,
event->state);
++ event->time_msec, BTN_RIGHT,
WL_POINTER_BUTTON_STATE_PRESSED);
+ }
+ break;
+ case WLR_BUTTON_RELEASED:
+ if (cursor->tool_buttons <= 1) {
+ dispatch_cursor_button(cursor,
&event->tablet->base,
+- event->time_msec, BTN_RIGHT,
event->state);
++ event->time_msec, BTN_RIGHT,
WL_POINTER_BUTTON_STATE_RELEASED);
+ }
+ break;
+ }
+diff --git a/sway/input/seat.c b/sway/input/seat.c
+index 9dd078c6163e..7ae298288197 100644
+--- a/sway/input/seat.c
++++ b/sway/input/seat.c
+@@ -1520,7 +1520,7 @@ struct seat_config *seat_get_config_by_name(const char
*name) {
+ }
+
+ void seat_pointer_notify_button(struct sway_seat *seat, uint32_t time_msec,
+- uint32_t button, enum wlr_button_state state) {
++ uint32_t button, enum wl_pointer_button_state state) {
+ seat->last_button_serial =
wlr_seat_pointer_notify_button(seat->wlr_seat,
+ time_msec, button, state);
+ }
+@@ -1557,7 +1557,7 @@ void seatop_unref(struct sway_seat *seat, struct
sway_container *con) {
+
+ void seatop_button(struct sway_seat *seat, uint32_t time_msec,
+ struct wlr_input_device *device, uint32_t button,
+- enum wlr_button_state state) {
++ enum wl_pointer_button_state state) {
+ if (seat->seatop_impl->button) {
+ seat->seatop_impl->button(seat, time_msec, device, button,
state);
+ }
+diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c
+index f2a9c2cdf4cd..0c6f7c5e385c 100644
+--- a/sway/input/seatop_default.c
++++ b/sway/input/seatop_default.c
+@@ -290,7 +290,7 @@ static void handle_tablet_tool_tip(struct sway_seat
*seat,
+
+ static bool trigger_pointer_button_binding(struct sway_seat *seat,
+ struct wlr_input_device *device, uint32_t button,
+- enum wlr_button_state state, uint32_t modifiers,
++ enum wl_pointer_button_state state, uint32_t modifiers,
+ bool on_titlebar, bool on_border, bool on_contents, bool
on_workspace) {
+ // We can reach this for non-pointer devices if we're currently
emulating
+ // pointer input for one. Emulated input should not trigger bindings.
The
+@@ -304,7 +304,7 @@ static bool trigger_pointer_button_binding(struct
sway_seat *seat,
+ char *device_identifier = device ? input_device_get_identifier(device)
+ : strdup("*");
+ struct sway_binding *binding = NULL;
+- if (state == WLR_BUTTON_PRESSED) {
++ if (state == WL_POINTER_BUTTON_STATE_PRESSED) {
+ state_add_button(e, button);
+ binding = get_active_mouse_binding(e,
+ config->current_mode->mouse_bindings, modifiers,
false,
+@@ -329,7 +329,7 @@ static bool trigger_pointer_button_binding(struct
sway_seat *seat,
+
+ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
+ struct wlr_input_device *device, uint32_t button,
+- enum wlr_button_state state) {
++ enum wl_pointer_button_state state) {
+ struct sway_cursor *cursor = seat->cursor;
+
+ // Determine what's under the cursor
+@@ -362,7 +362,7 @@ static void handle_button(struct sway_seat *seat,
uint32_t time_msec,
+
+ // Handle clicking an empty workspace
+ if (node && node->type == N_WORKSPACE) {
+- if (state == WLR_BUTTON_PRESSED) {
++ if (state == WL_POINTER_BUTTON_STATE_PRESSED) {
+ seat_set_focus(seat, node);
+ transaction_commit_dirty();
+ }
+@@ -377,7 +377,7 @@ static void handle_button(struct sway_seat *seat,
uint32_t time_msec,
+ seat_set_focus_layer(seat, layer);
+ transaction_commit_dirty();
+ }
+- if (state == WLR_BUTTON_PRESSED) {
++ if (state == WL_POINTER_BUTTON_STATE_PRESSED) {
+ seatop_begin_down_on_surface(seat, surface, sx, sy);
+ }
+ seat_pointer_notify_button(seat, time_msec, button, state);
+@@ -386,7 +386,7 @@ static void handle_button(struct sway_seat *seat,
uint32_t time_msec,
+
+ // Handle tiling resize via border
+ if (cont && resize_edge && button == BTN_LEFT &&
+- state == WLR_BUTTON_PRESSED && !is_floating) {
++ state == WL_POINTER_BUTTON_STATE_PRESSED &&
!is_floating) {
+ // If a resize is triggered on a tabbed or stacked container,
change
+ // focus to the tab which already had inactive focus --
otherwise, we'd
+ // change the active tab when the user probably just wanted
to resize.
+@@ -404,7 +404,7 @@ static void handle_button(struct sway_seat *seat,
uint32_t time_msec,
+ // Handle tiling resize via mod
+ bool mod_pressed = modifiers & config->floating_mod;
+ if (cont && !is_floating_or_child && mod_pressed &&
+- state == WLR_BUTTON_PRESSED) {
++ state == WL_POINTER_BUTTON_STATE_PRESSED) {
+ uint32_t btn_resize = config->floating_mod_inverse ?
+ BTN_LEFT : BTN_RIGHT;
+ if (button == btn_resize) {
+@@ -432,7 +432,7 @@ static void handle_button(struct sway_seat *seat,
uint32_t time_msec,
+ }
+
+ // Handle changing focus when clicking on a container
+- if (cont && state == WLR_BUTTON_PRESSED) {
++ if (cont && state == WL_POINTER_BUTTON_STATE_PRESSED) {
+ // Default case: focus the container that was just clicked.
+ node = &cont->node;
+
+@@ -453,7 +453,7 @@ static void handle_button(struct sway_seat *seat,
uint32_t time_msec,
+
+ // Handle beginning floating move
+ if (cont && is_floating_or_child && !is_fullscreen_or_child &&
+- state == WLR_BUTTON_PRESSED) {
++ state == WL_POINTER_BUTTON_STATE_PRESSED) {
+ uint32_t btn_move = config->floating_mod_inverse ? BTN_RIGHT
: BTN_LEFT;
+ if (button == btn_move && (mod_pressed || on_titlebar)) {
+ seatop_begin_move_floating(seat,
container_toplevel_ancestor(cont));
+@@ -463,7 +463,7 @@ static void handle_button(struct sway_seat *seat,
uint32_t time_msec,
+
+ // Handle beginning floating resize
+ if (cont && is_floating_or_child && !is_fullscreen_or_child &&
+- state == WLR_BUTTON_PRESSED) {
++ state == WL_POINTER_BUTTON_STATE_PRESSED) {
+ // Via border
+ if (button == BTN_LEFT && resize_edge != WLR_EDGE_NONE) {
+ seat_set_focus_container(seat, cont);
+@@ -489,7 +489,7 @@ static void handle_button(struct sway_seat *seat,
uint32_t time_msec,
+
+ // Handle moving a tiling container
+ if (config->tiling_drag && (mod_pressed || on_titlebar) &&
+- state == WLR_BUTTON_PRESSED && !is_floating_or_child
&&
++ state == WL_POINTER_BUTTON_STATE_PRESSED &&
!is_floating_or_child &&
+ cont && cont->pending.fullscreen_mode ==
FULLSCREEN_NONE) {
+ // If moving a container by its title bar, use a threshold
for the drag
+ if (!mod_pressed && config->tiling_drag_threshold > 0) {
+@@ -502,14 +502,14 @@ static void handle_button(struct sway_seat *seat,
uint32_t time_msec,
+ }
+
+ // Handle mousedown on a container surface
+- if (surface && cont && state == WLR_BUTTON_PRESSED) {
++ if (surface && cont && state == WL_POINTER_BUTTON_STATE_PRESSED) {
+ seatop_begin_down(seat, cont, sx, sy);
+- seat_pointer_notify_button(seat, time_msec, button,
WLR_BUTTON_PRESSED);
++ seat_pointer_notify_button(seat, time_msec, button,
WL_POINTER_BUTTON_STATE_PRESSED);
+ return;
+ }
+
+ // Handle clicking a container surface or decorations
+- if (cont && state == WLR_BUTTON_PRESSED) {
++ if (cont && state == WL_POINTER_BUTTON_STATE_PRESSED) {
+ seat_pointer_notify_button(seat, time_msec, button, state);
+ return;
+ }
+@@ -684,7 +684,7 @@ static void handle_touch_down(struct sway_seat *seat,
+ pointer_motion(cursor, event->time_msec, &event->touch->base,
dx, dy,
+ dx, dy);
+ dispatch_cursor_button(cursor, &event->touch->base,
event->time_msec,
+- BTN_LEFT, WLR_BUTTON_PRESSED);
++ BTN_LEFT, WL_POINTER_BUTTON_STATE_PRESSED);
+ }
+ }
+
+@@ -694,9 +694,9 @@ static void handle_touch_down(struct sway_seat *seat,
+
+ static uint32_t wl_axis_to_button(struct wlr_pointer_axis_event *event) {
+ switch (event->orientation) {
+- case WLR_AXIS_ORIENTATION_VERTICAL:
++ case WL_POINTER_AXIS_VERTICAL_SCROLL:
+ return event->delta < 0 ? SWAY_SCROLL_UP : SWAY_SCROLL_DOWN;
+- case WLR_AXIS_ORIENTATION_HORIZONTAL:
++ case WL_POINTER_AXIS_HORIZONTAL_SCROLL:
+ return event->delta < 0 ? SWAY_SCROLL_LEFT :
SWAY_SCROLL_RIGHT;
+ default:
+ sway_log(SWAY_DEBUG, "Unknown axis orientation");
+diff --git a/sway/input/seatop_down.c b/sway/input/seatop_down.c
+index 12d7ae7a6ee7..35fd3bcb2024 100644
+--- a/sway/input/seatop_down.c
++++ b/sway/input/seatop_down.c
+@@ -142,7 +142,7 @@ static void handle_pointer_axis(struct sway_seat *seat,
+
+ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
+ struct wlr_input_device *device, uint32_t button,
+- enum wlr_button_state state) {
++ enum wl_pointer_button_state state) {
+ seat_pointer_notify_button(seat, time_msec, button, state);
+
+ if (seat->cursor->pressed_button_count == 0) {
+diff --git a/sway/input/seatop_move_floating.c
b/sway/input/seatop_move_floating.c
+index 7de3f4d8373d..83668d88eee2 100644
+--- a/sway/input/seatop_move_floating.c
++++ b/sway/input/seatop_move_floating.c
+@@ -21,7 +21,7 @@ static void finalize_move(struct sway_seat *seat) {
+
+ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
+ struct wlr_input_device *device, uint32_t button,
+- enum wlr_button_state state) {
++ enum wl_pointer_button_state state) {
+ if (seat->cursor->pressed_button_count == 0) {
+ finalize_move(seat);
+ }
+diff --git a/sway/input/seatop_move_tiling.c
b/sway/input/seatop_move_tiling.c
+index 4f4d6e4198ba..c525b77a9e9b 100644
+--- a/sway/input/seatop_move_tiling.c
++++ b/sway/input/seatop_move_tiling.c
+@@ -405,7 +405,7 @@ static void finalize_move(struct sway_seat *seat) {
+
+ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
+ struct wlr_input_device *device, uint32_t button,
+- enum wlr_button_state state) {
++ enum wl_pointer_button_state state) {
+ if (seat->cursor->pressed_button_count == 0) {
+ finalize_move(seat);
+ }
+diff --git a/sway/input/seatop_resize_floating.c
b/sway/input/seatop_resize_floating.c
+index 168dfffe3eee..bec86e33ad43 100644
+--- a/sway/input/seatop_resize_floating.c
++++ b/sway/input/seatop_resize_floating.c
+@@ -20,7 +20,7 @@ struct seatop_resize_floating_event {
+
+ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
+ struct wlr_input_device *device, uint32_t button,
+- enum wlr_button_state state) {
++ enum wl_pointer_button_state state) {
+ struct seatop_resize_floating_event *e = seat->seatop_data;
+ struct sway_container *con = e->con;
+
+diff --git a/sway/input/seatop_resize_tiling.c
b/sway/input/seatop_resize_tiling.c
+index 9ce4ff8b1ace..15fd333b390b 100644
+--- a/sway/input/seatop_resize_tiling.c
++++ b/sway/input/seatop_resize_tiling.c
+@@ -45,7 +45,7 @@ static struct sway_container *container_get_resize_sibling(
+
+ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
+ struct wlr_input_device *device, uint32_t button,
+- enum wlr_button_state state) {
++ enum wl_pointer_button_state state) {
+ struct seatop_resize_tiling_event *e = seat->seatop_data;
+
+ if (seat->cursor->pressed_button_count == 0) {
+--
+2.46.0
+
diff --git
a/windowmanagers/sway/patches/0010-input-Rename-WLR_INPUT_DEVICE_TABLET_TOOL-to.patch

b/windowmanagers/sway/patches/0010-input-Rename-WLR_INPUT_DEVICE_TABLET_TOOL-to.patch
new file mode 100644
index 0000000..7248102
--- /dev/null
+++
b/windowmanagers/sway/patches/0010-input-Rename-WLR_INPUT_DEVICE_TABLET_TOOL-to.patch
@@ -0,0 +1,107 @@
+From 2058209a130f5051b59d8ebb24196409695deaaf Mon Sep 17 00:00:00 2001
+From: Luofan Chen <clfbbn AT gmail.com>
+Date: Fri, 1 Mar 2024 11:43:14 +0800
+Subject: [PATCH 10/15] input: Rename WLR_INPUT_DEVICE_TABLET_TOOL to
+ WLR_INPUT_DEVICE_TABLET
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+wlroots has changed the naming, causing the following build errors when
+building:
+
+error: ‘WLR_INPUT_DEVICE_TABLET_TOOL’ undeclared
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ sway/input/cursor.c | 4 ++--
+ sway/input/input-manager.c | 2 +-
+ sway/input/seat.c | 10 +++++-----
+ 3 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/sway/input/cursor.c b/sway/input/cursor.c
+index 7d66a89d98bd..3d04826cdf70 100644
+--- a/sway/input/cursor.c
++++ b/sway/input/cursor.c
+@@ -243,7 +243,7 @@ static enum sway_input_idle_source
idle_source_from_device(
+ return IDLE_SOURCE_POINTER;
+ case WLR_INPUT_DEVICE_TOUCH:
+ return IDLE_SOURCE_TOUCH;
+- case WLR_INPUT_DEVICE_TABLET_TOOL:
++ case WLR_INPUT_DEVICE_TABLET:
+ return IDLE_SOURCE_TABLET_TOOL;
+ case WLR_INPUT_DEVICE_TABLET_PAD:
+ return IDLE_SOURCE_TABLET_PAD;
+@@ -518,7 +518,7 @@ static void apply_mapping_from_region(struct
wlr_input_device *device,
+ double x1 = region->x1, x2 = region->x2;
+ double y1 = region->y1, y2 = region->y2;
+
+- if (region->mm && device->type == WLR_INPUT_DEVICE_TABLET_TOOL) {
++ if (region->mm && device->type == WLR_INPUT_DEVICE_TABLET) {
+ struct wlr_tablet *tablet =
wlr_tablet_from_input_device(device);
+ if (tablet->width_mm == 0 || tablet->height_mm == 0) {
+ return;
+diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
+index 9ee635af23c7..056cc3ea8bf3 100644
+--- a/sway/input/input-manager.c
++++ b/sway/input/input-manager.c
+@@ -111,7 +111,7 @@ const char *input_device_get_type(struct
sway_input_device *device) {
+ return "keyboard";
+ case WLR_INPUT_DEVICE_TOUCH:
+ return "touch";
+- case WLR_INPUT_DEVICE_TABLET_TOOL:
++ case WLR_INPUT_DEVICE_TABLET:
+ return "tablet_tool";
+ case WLR_INPUT_DEVICE_TABLET_PAD:
+ return "tablet_pad";
+diff --git a/sway/input/seat.c b/sway/input/seat.c
+index 7ae298288197..f2486893533c 100644
+--- a/sway/input/seat.c
++++ b/sway/input/seat.c
+@@ -607,7 +607,7 @@ static void seat_update_capabilities(struct sway_seat
*seat) {
+ case WLR_INPUT_DEVICE_TOUCH:
+ caps |= WL_SEAT_CAPABILITY_TOUCH;
+ break;
+- case WLR_INPUT_DEVICE_TABLET_TOOL:
++ case WLR_INPUT_DEVICE_TABLET:
+ caps |= WL_SEAT_CAPABILITY_POINTER;
+ break;
+ case WLR_INPUT_DEVICE_SWITCH:
+@@ -665,7 +665,7 @@ static const char *get_builtin_output_name(void) {
+ static bool is_touch_or_tablet_tool(struct sway_seat_device *seat_device) {
+ switch (seat_device->input_device->wlr_device->type) {
+ case WLR_INPUT_DEVICE_TOUCH:
+- case WLR_INPUT_DEVICE_TABLET_TOOL:
++ case WLR_INPUT_DEVICE_TABLET:
+ return true;
+ default:
+ return false;
+@@ -680,7 +680,7 @@ static void seat_apply_input_mapping(struct sway_seat
*seat,
+ switch (sway_device->input_device->wlr_device->type) {
+ case WLR_INPUT_DEVICE_POINTER:
+ case WLR_INPUT_DEVICE_TOUCH:
+- case WLR_INPUT_DEVICE_TABLET_TOOL:
++ case WLR_INPUT_DEVICE_TABLET:
+ break;
+ default:
+ return; // these devices don't support mappings
+@@ -873,7 +873,7 @@ void seat_configure_device(struct sway_seat *seat,
+ case WLR_INPUT_DEVICE_TOUCH:
+ seat_configure_touch(seat, seat_device);
+ break;
+- case WLR_INPUT_DEVICE_TABLET_TOOL:
++ case WLR_INPUT_DEVICE_TABLET:
+ seat_configure_tablet_tool(seat, seat_device);
+ break;
+ case WLR_INPUT_DEVICE_TABLET_PAD:
+@@ -912,7 +912,7 @@ void seat_reset_device(struct sway_seat *seat,
+ case WLR_INPUT_DEVICE_TOUCH:
+ seat_reset_input_config(seat, seat_device);
+ break;
+- case WLR_INPUT_DEVICE_TABLET_TOOL:
++ case WLR_INPUT_DEVICE_TABLET:
+ seat_reset_input_config(seat, seat_device);
+ break;
+ case WLR_INPUT_DEVICE_TABLET_PAD:
+--
+2.46.0
+
diff --git
a/windowmanagers/sway/patches/0011-Fetch-input-device-vendor-product-from-libinput.patch

b/windowmanagers/sway/patches/0011-Fetch-input-device-vendor-product-from-libinput.patch
new file mode 100644
index 0000000..51bae1d
--- /dev/null
+++
b/windowmanagers/sway/patches/0011-Fetch-input-device-vendor-product-from-libinput.patch
@@ -0,0 +1,63 @@
+From f2a0e81b2438853e12a2b8fe9bddde154852d85d Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact AT emersion.fr>
+Date: Thu, 7 Mar 2024 12:16:11 +0100
+Subject: [PATCH 11/15] Fetch input device vendor/product from libinput
+
+References:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4582
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ sway/input/input-manager.c | 11 +++++++++--
+ sway/ipc-json.c | 8 ++++----
+ 2 files changed, 13 insertions(+), 6 deletions(-)
+
+diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
+index 056cc3ea8bf3..089e1e718989 100644
+--- a/sway/input/input-manager.c
++++ b/sway/input/input-manager.c
+@@ -65,8 +65,15 @@ struct sway_seat
*input_manager_sway_seat_from_wlr_seat(struct wlr_seat *wlr_sea
+ }
+
+ char *input_device_get_identifier(struct wlr_input_device *device) {
+- int vendor = device->vendor;
+- int product = device->product;
++ int vendor = 0, product = 0;
++#if WLR_HAS_LIBINPUT_BACKEND
++ if (wlr_input_device_is_libinput(device)) {
++ struct libinput_device *libinput_dev =
wlr_libinput_get_device_handle(device);
++ vendor = libinput_device_get_id_vendor(libinput_dev);
++ product = libinput_device_get_id_product(libinput_dev);
++ }
++#endif
++
+ char *name = strdup(device->name ? device->name : "");
+ strip_whitespace(name);
+
+diff --git a/sway/ipc-json.c b/sway/ipc-json.c
+index dfbb7a6ec41b..81ca34831f56 100644
+--- a/sway/ipc-json.c
++++ b/sway/ipc-json.c
+@@ -1097,10 +1097,6 @@ json_object *ipc_json_describe_input(struct
sway_input_device *device) {
+ json_object_new_string(device->identifier));
+ json_object_object_add(object, "name",
+ json_object_new_string(device->wlr_device->name));
+- json_object_object_add(object, "vendor",
+- json_object_new_int(device->wlr_device->vendor));
+- json_object_object_add(object, "product",
+- json_object_new_int(device->wlr_device->product));
+ json_object_object_add(object, "type",
+ json_object_new_string(
+ input_device_get_type(device)));
+@@ -1154,6 +1150,10 @@ json_object *ipc_json_describe_input(struct
sway_input_device *device) {
+ libinput_dev =
wlr_libinput_get_device_handle(device->wlr_device);
+ json_object_object_add(object, "libinput",
+ describe_libinput_device(libinput_dev));
++ json_object_object_add(object, "vendor",
++
json_object_new_int(libinput_device_get_id_vendor(libinput_dev)));
++ json_object_object_add(object, "product",
++
json_object_new_int(libinput_device_get_id_product(libinput_dev)));
+ }
+ #endif
+
+--
+2.46.0
+
diff --git
a/windowmanagers/sway/patches/0012-Update-for-versioned-wlroots-files.patch
b/windowmanagers/sway/patches/0012-Update-for-versioned-wlroots-files.patch
new file mode 100644
index 0000000..c179f26
--- /dev/null
+++
b/windowmanagers/sway/patches/0012-Update-for-versioned-wlroots-files.patch
@@ -0,0 +1,27 @@
+From 2e9139df664f1e2dbe14b5df4a9646411b924c66 Mon Sep 17 00:00:00 2001
+From: Violet Purcell <vimproved AT inventati.org>
+Date: Sun, 17 Mar 2024 13:27:34 -0400
+Subject: [PATCH 12/15] Update for versioned wlroots files
+
+References:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4614
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 3c444e07782f..eb66506ab2df 100644
+--- a/meson.build
++++ b/meson.build
+@@ -45,7 +45,7 @@ subproject(
+ required: false,
+ version: wlroots_version,
+ )
+-wlroots = dependency('wlroots', version: wlroots_version)
++wlroots = dependency('wlroots-0.18', version: wlroots_version, fallback:
'wlroots')
+ wlroots_features = {
+ 'xwayland': false,
+ 'libinput_backend': false,
+--
+2.46.0
+
diff --git
a/windowmanagers/sway/patches/0013-input-pass-wlr_seat_client-to-wlr_seat_touch_notify_cancel-.patch

b/windowmanagers/sway/patches/0013-input-pass-wlr_seat_client-to-wlr_seat_touch_notify_cancel-.patch
new file mode 100644
index 0000000..2272659
--- /dev/null
+++
b/windowmanagers/sway/patches/0013-input-pass-wlr_seat_client-to-wlr_seat_touch_notify_cancel-.patch
@@ -0,0 +1,31 @@
+From 9e1465107788af2c8ce93e2a288e9d32bc09711c Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact AT emersion.fr>
+Date: Thu, 28 Mar 2024 11:45:46 +0100
+Subject: [PATCH 13/15] input: pass wlr_seat_client to
wlr_seat_touch_notify_cancel()
+
+References:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4613
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ sway/input/seatop_down.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/sway/input/seatop_down.c b/sway/input/seatop_down.c
+index 35fd3bcb2024..340e334bfd7c 100644
+--- a/sway/input/seatop_down.c
++++ b/sway/input/seatop_down.c
+@@ -117,7 +117,11 @@ static void handle_touch_cancel(struct sway_seat *seat,
+ }
+
+ if (e->surface) {
+- wlr_seat_touch_notify_cancel(seat->wlr_seat, e->surface);
++ struct wl_client *client =
wl_resource_get_client(e->surface->resource);
++ struct wlr_seat_client *seat_client =
wlr_seat_client_for_wl_client(seat->wlr_seat, client);
++ if (seat_client != NULL) {
++ wlr_seat_touch_notify_cancel(seat->wlr_seat,
seat_client);
++ }
+ }
+
+ if (wl_list_empty(&e->point_events)) {
+--
+2.46.0
+
diff --git
a/windowmanagers/sway/patches/0014-server-Use-wlr_renderer_get_texture_formats.patch

b/windowmanagers/sway/patches/0014-server-Use-wlr_renderer_get_texture_formats.patch
new file mode 100644
index 0000000..632b64f
--- /dev/null
+++
b/windowmanagers/sway/patches/0014-server-Use-wlr_renderer_get_texture_formats.patch
@@ -0,0 +1,31 @@
+From ffcde7a70c1341d1ec1d38c00ff87faa1a816892 Mon Sep 17 00:00:00 2001
+From: Kenny Levinsen <kl AT kl.wtf>
+Date: Sun, 21 Apr 2024 16:42:08 +0200
+Subject: [PATCH 14/15] server: Use wlr_renderer_get_texture_formats
+
+wlr_renderer_get_{dmabuf|shm}_texture_formats have been replaced by a
+unified wlr_renderer_get_texture_formats interface using buffer caps.
+
+References:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4644
+[ismael AT sourcemage.org: Backported to 1.9]
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ sway/server.c | 9 +-
+ 1 file changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/sway/server.c b/sway/server.c
+index d159dc9bd03f..180d3a6bc3df 100644
+--- a/sway/server.c
++++ b/sway/server.c
+@@ -240,7 +240,7 @@ bool server_init(struct sway_server *server) {
+
+ wlr_renderer_init_wl_shm(server->renderer, server->wl_display);
+
+- if (wlr_renderer_get_dmabuf_texture_formats(server->renderer) !=
NULL) {
++ if (wlr_renderer_get_texture_formats(server->renderer,
WLR_BUFFER_CAP_DMABUF) != NULL) {
+ server->linux_dmabuf_v1 =
wlr_linux_dmabuf_v1_create_with_renderer(
+ server->wl_display, 4, server->renderer);
+ }
+--
+2.46.0
+
diff --git
a/windowmanagers/sway/patches/0015-protocols-use-tablet-v2-xml-from-stable-.patch

b/windowmanagers/sway/patches/0015-protocols-use-tablet-v2-xml-from-stable-.patch
new file mode 100644
index 0000000..242350f
--- /dev/null
+++
b/windowmanagers/sway/patches/0015-protocols-use-tablet-v2-xml-from-stable-.patch
@@ -0,0 +1,29 @@
+From cdde0165dad94e4522f8f6f040e9d30145fbb14f Mon Sep 17 00:00:00 2001
+From: Kirill Primak <vyivel AT eclair.cafe>
+Date: Thu, 27 Jun 2024 21:01:19 +0300
+Subject: [PATCH 15/15] protocols: use tablet-v2 xml from stable/
+
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ protocols/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/protocols/meson.build b/protocols/meson.build
+index 81edb5841b23..6eac8542c000 100644
+--- a/protocols/meson.build
++++ b/protocols/meson.build
+@@ -7,10 +7,10 @@ wayland_scanner = find_program(
+ )
+
+ protocols = [
++ wl_protocol_dir / 'stable/tablet/tablet-v2.xml',
+ wl_protocol_dir / 'stable/xdg-shell/xdg-shell.xml',
+ wl_protocol_dir / 'unstable/xdg-output/xdg-output-unstable-v1.xml',
+ wl_protocol_dir /
'unstable/pointer-constraints/pointer-constraints-unstable-v1.xml',
+- wl_protocol_dir / 'unstable/tablet/tablet-unstable-v2.xml',
+ wl_protocol_dir /
'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml',
+ wl_protocol_dir / 'staging/content-type/content-type-v1.xml',
+ wl_protocol_dir / 'staging/cursor-shape/cursor-shape-v1.xml',
+--
+2.46.0
+


  • [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (b37cd8b5cf49052a02f1b90337a2e2ef184f2f3b), Ismael Luceno, 09/07/2024

Archive powered by MHonArc 2.6.24.

Top of Page