From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-4.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.5 Received: by atuin.qyliss.net (Postfix, from userid 496) id 6178F1804D; Thu, 29 Jul 2021 10:10:53 +0000 (UTC) Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id A299C17E9C; Thu, 29 Jul 2021 10:10:19 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id CCE4617E04; Thu, 29 Jul 2021 10:10:16 +0000 (UTC) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by atuin.qyliss.net (Postfix) with ESMTPS id CF52217D5E for ; Thu, 29 Jul 2021 10:10:09 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 9BB613200978 for ; Thu, 29 Jul 2021 06:10:08 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 29 Jul 2021 06:10:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h= from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=DqvXWtIkfFSnd yrU6QSBb0xziB0ZS/mQEM7VrSyFJNQ=; b=HalBcH8C7IM80neE3JfHLZtKPU6pG Qbzt3FxPRzr/MpKGTTsq79deXUl8w8NLzEtk1Lfj2Tu1FKmM86pW1LKBrSste2Ke 7xjICyoNrtv6X2oI/Tkt7TUJEH3w85llDWW59al7WkWX2g2Za6PuqBTjgzMb8C9T 6xAcSXkEg8C8ld//yds6X7ma9BS4XhZTItT8fau0WMeMyGtO+DpwKEMwrI5vG+sc MHNkTB9WIIHbZsU0FuZ0Qx3S3yEBQpr052JXIS20sBChxqhs+OI22pw9IgRFQkGL 3jcuG4KhWtk8347Rstvse+yVUKhF902APhTMYn6A4iji9KceXLOplEhHg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=DqvXWtIkfFSndyrU6QSBb0xziB0ZS/mQEM7VrSyFJNQ=; b=CRusqE5O xNzemS/8hkx9FH8VO6ubaJDtvD+n76mxrXahiGzjZJPHyF35KjPjYWkXdac6Eb+z wMrUlKfTP6d1KlfHrClmv3n3ZGLWRw44IsuCEfOLFcNEOrFwexlq68PRWogvOaqo wopJ4xGv9hYnrDopG0loYNWt6iWk5WMq817CPdAJ3GoW6+GdE6YFvrv9+e9XUfcL MhoyjeiIlTdsrPmLrLJaZRJJ0dHOsvbeeZ8vgknzcL9kuqhklOrTF4ZA8/29cy9c dhGdFdKAdebq9hfTeEcomgqoE2gJf+sBnysJM988MC2krcgjYGCWb/nQ+rneuL+h /r/4bMI+E70zBQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrhedugddukecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetlhihshhsrgcutfhoshhsuceohhhisegrlhihshhsrgdrihhs qeenucggtffrrghtthgvrhhnpefgfedukedvleeileeludefveehgeelgfegvddujedvtd ffueeuveffheeljeekvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehqhihlihhsshesvghvvgdrqhihlhhishhsrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Thu, 29 Jul 2021 06:10:07 -0400 (EDT) Received: by eve.qyliss.net (Postfix, from userid 1000) id 2318F13F0; Thu, 29 Jul 2021 10:10:04 +0000 (UTC) From: Alyssa Ross To: devel@spectrum-os.org Subject: [PATCH nixpkgs 6/6] wlroots: update Spectrum patches Date: Thu, 29 Jul 2021 10:09:28 +0000 Message-Id: <20210729100928.1965341-7-hi@alyssa.is> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210729100928.1965341-1-hi@alyssa.is> References: <20210729100928.1965341-1-hi@alyssa.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 2F4KWGZQRDDKIXM77SJNJXATKGMHHCKD X-Message-ID-Hash: 2F4KWGZQRDDKIXM77SJNJXATKGMHHCKD X-MailFrom: qyliss@eve.qyliss.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.4 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --- ...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 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 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