wl-kbptr: update to 0.4.0.

This commit is contained in:
Duncaen 2025-07-05 03:55:33 +02:00
parent 7247885429
commit 4d1a99fd54
No known key found for this signature in database
GPG key ID: 335C1D17EC3D6E35
3 changed files with 2 additions and 56 deletions

View file

@ -1,28 +0,0 @@
From 1db88d904f124636c7ade8fdd7881d0fd2d6caf1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Martinez?= <me@moverest.xyz>
Date: Mon, 14 Apr 2025 06:48:08 +0100
Subject: [PATCH] Don't enter first mode if layer surface not configured
On some compositors (Niri) the `surface.enter()` is called before the
layer surface configure event is sent. This means that we don't have the
surface's dimensions, we try to enter the mode anyway, and we break.
This change prevents that.
---
src/main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main.c b/src/main.c
index f7bb237..81a5886 100644
--- a/src/main.c
+++ b/src/main.c
@@ -439,7 +439,9 @@ static void handle_surface_enter(
find_output_from_wl_output(&state->outputs, wl_output);
state->current_output = output;
- enter_first_mode(state);
+ if (state->surface_configured) {
+ enter_first_mode(state);
+ }
}
static const struct wl_surface_listener surface_listener = {

View file

@ -1,26 +0,0 @@
From aec15d243b7c19017583227de0c72c79c6e771e4 Mon Sep 17 00:00:00 2001
From: Duncan Overbruck <mail@duncano.de>
Date: Sun, 1 Jun 2025 22:56:36 +0200
Subject: [PATCH] fix memory corruption due to wrong sizeof in
label_selection_new
---
src/label.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/label.c b/src/label.c
index 0df5db6..b742d3c 100644
--- a/src/label.c
+++ b/src/label.c
@@ -88,7 +88,7 @@ int label_symbols_find_idx(label_symbols_t *label_symbols, char *s) {
label_selection_t *
label_selection_new(label_symbols_t *label_symbols, int num_labels) {
label_selection_t *l =
- malloc(sizeof(label_symbols_t) + label_symbols->num_symbols);
+ malloc(sizeof(label_selection_t) + label_symbols->num_symbols);
l->num_labels = num_labels;
--
2.49.0

View file

@ -1,6 +1,6 @@
# Template file for 'wl-kbptr'
pkgname=wl-kbptr
version=0.3.0
version=0.4.0
revision=1
build_style=meson
configure_args="-Dopencv=enabled"
@ -11,4 +11,4 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
license="GPL-3.0-only"
homepage="https://github.com/moverest/wl-kbptr"
distfiles="https://github.com/moverest/wl-kbptr/archive/refs/tags/v${version}.tar.gz"
checksum=69775029acb8ff7d814a2868afe22e72b8c9c99cbb35b0acf57eccd3609b089c
checksum=e3655f5305987dbac389a25e64c2f5a028c1651db70ea757024c4efa55c24338