From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Subject: [PATCH nixpkgs 6/6] wlroots: update Spectrum patches
Date: Thu, 29 Jul 2021 10:09:28 +0000 [thread overview]
Message-ID: <20210729100928.1965341-7-hi@alyssa.is> (raw)
In-Reply-To: <20210729100928.1965341-1-hi@alyssa.is>
---
...ayland-downgrade-to-wl_compositor-v3.patch | 64 +++++++++++--------
...til-support-virtio_wl-shm-allocation.patch | 11 ++--
2 files changed, 45 insertions(+), 30 deletions(-)
diff --git a/pkgs/development/libraries/wlroots/0001-backend-wayland-downgrade-to-wl_compositor-v3.patch b/pkgs/development/libraries/wlroots/0001-backend-wayland-downgrade-to-wl_compositor-v3.patch
index 400bcea368b..e6d934419f0 100644
--- a/pkgs/development/libraries/wlroots/0001-backend-wayland-downgrade-to-wl_compositor-v3.patch
+++ b/pkgs/development/libraries/wlroots/0001-backend-wayland-downgrade-to-wl_compositor-v3.patch
@@ -1,4 +1,4 @@
-From 32c2af6d7091a5964056f2d3006e333d3602bd82 Mon Sep 17 00:00:00 2001
+From fae720321c2e8e4d57c9c6554d4f025b1808747c Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Tue, 25 Aug 2020 17:34:48 +0000
Subject: [PATCH 1/2] backend/wayland: downgrade to wl_compositor v3
@@ -9,25 +9,25 @@ Rather than calculating exact surface-relative damage regions instead
of the previous buffer-relative ones, just damage the whole surface.
It'll do for now.
---
- backend/wayland/backend.c | 6 +++++-
- backend/wayland/output.c | 4 +++-
- include/backend/wayland.h | 1 +
- 3 files changed, 9 insertions(+), 2 deletions(-)
+ backend/wayland/backend.c | 6 +++++-
+ backend/wayland/output.c | 11 +++++++++--
+ include/backend/wayland.h | 1 +
+ 3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c
-index 8de63acf..b1fddfc7 100644
+index 771f4405..fc798292 100644
--- a/backend/wayland/backend.c
+++ b/backend/wayland/backend.c
-@@ -101,7 +101,7 @@ static void registry_global(void *data, struct wl_registry *registry,
+@@ -210,7 +210,7 @@ static void registry_global(void *data, struct wl_registry *registry,
if (strcmp(iface, wl_compositor_interface.name) == 0) {
wl->compositor = wl_registry_bind(registry, name,
- &wl_compositor_interface, 4);
+ &wl_compositor_interface, wl_compositor_version());
} else if (strcmp(iface, wl_seat_interface.name) == 0) {
- wl->seat = wl_registry_bind(registry, name,
+ struct wl_seat *wl_seat = wl_registry_bind(registry, name,
&wl_seat_interface, 5);
-@@ -244,6 +244,10 @@ bool wlr_backend_is_wl(struct wlr_backend *b) {
+@@ -373,6 +373,10 @@ bool wlr_backend_is_wl(struct wlr_backend *b) {
return b->impl == &backend_impl;
}
@@ -39,32 +39,46 @@ index 8de63acf..b1fddfc7 100644
struct wlr_wl_backend *wl =
wl_container_of(listener, wl, local_display_destroy);
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
-index bd17fa20..d91c5cc0 100644
+index 542185ce..5c5ff93d 100644
--- a/backend/wayland/output.c
+++ b/backend/wayland/output.c
-@@ -262,7 +262,9 @@ static bool output_commit(struct wlr_output *wlr_output) {
+@@ -319,7 +319,9 @@ static bool output_commit(struct wlr_output *wlr_output) {
- wl_surface_attach(output->surface, buffer->wl_buffer, 0, 0);
+ wl_surface_attach(output->surface, buffer->wl_buffer, 0, 0);
-- if (damage == NULL) {
-+ if (wl_compositor_version() < 4) {
-+ wl_surface_damage(output->surface, 0, 0, INT32_MAX, INT32_MAX);
-+ } else if (damage == NULL) {
- wl_surface_damage_buffer(output->surface,
- 0, 0, INT32_MAX, INT32_MAX);
- } else {
+- if (damage == NULL) {
++ if (wl_compositor_version() < 4) {
++ wl_surface_damage(output->surface, 0, 0, INT32_MAX, INT32_MAX);
++ } else if (damage == NULL) {
+ wl_surface_damage_buffer(output->surface,
+ 0, 0, INT32_MAX, INT32_MAX);
+ } else {
+@@ -381,7 +383,12 @@ static bool output_set_cursor(struct wlr_output *wlr_output,
+ }
+
+ wl_surface_attach(surface, buffer->wl_buffer, 0, 0);
+- wl_surface_damage_buffer(surface, 0, 0, INT32_MAX, INT32_MAX);
++
++ if (wl_compositor_version() < 4)
++ wl_surface_damage(surface, 0, 0, INT32_MAX, INT32_MAX);
++ else
++ wl_surface_damage_buffer(surface, 0, 0, INT32_MAX, INT32_MAX);
++
+ wl_surface_commit(surface);
+ } else {
+ wl_surface_attach(surface, NULL, 0, 0);
diff --git a/include/backend/wayland.h b/include/backend/wayland.h
-index 9a8a404b..9d7b5eb4 100644
+index 5d69c248..344dffb1 100644
--- a/include/backend/wayland.h
+++ b/include/backend/wayland.h
-@@ -114,6 +114,7 @@ void create_wl_pointer(struct wl_pointer *wl_pointer, struct wlr_wl_output *outp
- void create_wl_keyboard(struct wl_keyboard *wl_keyboard, struct wlr_wl_backend *wl);
- struct wlr_wl_input_device *create_wl_input_device(
- struct wlr_wl_backend *backend, enum wlr_input_device_type type);
+@@ -131,6 +131,7 @@ struct wlr_wl_input_device *create_wl_input_device(
+ bool create_wl_seat(struct wl_seat *wl_seat, struct wlr_wl_backend *wl);
+ void destroy_wl_seats(struct wlr_wl_backend *wl);
+ void destroy_wl_buffer(struct wlr_wl_buffer *buffer);
+uint32_t wl_compositor_version(void);
extern const struct wl_seat_listener seat_listener;
--
-2.27.0
+2.31.1
diff --git a/pkgs/development/libraries/wlroots/0002-util-support-virtio_wl-shm-allocation.patch b/pkgs/development/libraries/wlroots/0002-util-support-virtio_wl-shm-allocation.patch
index 90e81596ab4..cd25aedf35a 100644
--- a/pkgs/development/libraries/wlroots/0002-util-support-virtio_wl-shm-allocation.patch
+++ b/pkgs/development/libraries/wlroots/0002-util-support-virtio_wl-shm-allocation.patch
@@ -1,4 +1,4 @@
-From 7a85901b79c8a3c82167b446ee20fc46f50b0e1c Mon Sep 17 00:00:00 2001
+From 8dc7c4e472f6c23e20aee6a7041d260344ffd918 Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Sat, 23 May 2020 03:42:33 +0000
Subject: [PATCH 2/2] util: support virtio_wl shm allocation
@@ -51,16 +51,17 @@ index 00000000..d9f9f045
+
+#endif
diff --git a/util/meson.build b/util/meson.build
-index 14cd59c5..87311b98 100644
+index 5e31cbbe..a39cc9bd 100644
--- a/util/meson.build
+++ b/util/meson.build
-@@ -6,4 +6,6 @@ wlr_files += files(
- 'shm.c',
+@@ -7,5 +7,7 @@ wlr_files += files(
'signal.c',
'time.c',
+ 'token.c',
+ 'virtio_wl.c',
+ 'virtio_wl_shm.c',
)
+
diff --git a/util/shm.c b/util/shm.c
index f7c7303e..d8110904 100644
--- a/util/shm.c
@@ -277,5 +278,5 @@ index 00000000..b2109310
+ return r;
+}
--
-2.27.0
+2.31.1
--
2.32.0
next prev parent reply other threads:[~2021-07-29 10:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-29 10:09 [PATCH nixpkgs 0/6] Fix build failures after Nixpkgs update Alyssa Ross
2021-07-29 10:09 ` [PATCH nixpkgs 1/6] chromiumOSPackages.vm_protos: set full go_package Alyssa Ross
2021-07-29 10:09 ` [PATCH nixpkgs 2/6] chromiumOSPackages.modemmanager: disable patches Alyssa Ross
2021-07-29 10:09 ` [PATCH nixpkgs 3/6] chromiumOSPackages.modemmanager-next: add gtk-doc Alyssa Ross
2021-07-29 10:09 ` [PATCH nixpkgs 4/6] chromiumOSPackages.libqmi: disable QRTR Alyssa Ross
2021-07-29 10:09 ` [PATCH nixpkgs 5/6] linux_cros: fix build Alyssa Ross
2021-07-29 10:09 ` Alyssa Ross [this message]
2021-08-02 20:32 ` [PATCH nixpkgs 0/6] Fix build failures after Nixpkgs update Cole Helbling
2021-08-03 7:57 ` Alyssa Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210729100928.1965341-7-hi@alyssa.is \
--to=hi@alyssa.is \
--cc=devel@spectrum-os.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).