Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ to `main` publishes every changed version at once, so when merging, rename

## 2026-11-20

### labwc 1:0.20.2-6

- A swipe up from the bottom edge reaches the notification center and the
control center as their own drag, which follows the finger, instead of
closing them at once.

### labwc 1:0.20.2-5

- A touch no longer leaves a hidden cursor behind that hovers whatever ends
Expand Down
8 changes: 6 additions & 2 deletions packages/labwc/arch/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pkgname=labwc
_commit=97f28877a343e062f3178d201f0248cd9c2610cf
epoch=1
pkgver=0.20.2
pkgrel=5
pkgrel=6
pkgdesc='stacking wayland compositor with look and feel from openbox, with OrchardLinux tablet patches'
url="https://github.com/labwc/labwc"
arch=('aarch64' 'armv7h')
Expand Down Expand Up @@ -65,6 +65,7 @@ _patches=(
0006-hide-cursor-until-pointer-input.patch
0007-on-screen-keyboard-listener.patch
0008-no-pointer-focus-while-cursor-hidden.patch
0009-bottom-swipe-ignore-namespace-list.patch
)
source=("labwc-${_commit}.tar.gz::https://codeload.github.com/labwc/labwc/tar.gz/${_commit}"
"${_patches[@]}")
Expand All @@ -76,7 +77,8 @@ sha256sums=('022676dbcbf6b6206b97d7bac8a339c8a0203e3e99693107c15b5a6183e4b0ea'
'0966d5b303c6230eb429154f0e24708cc3a5421cc7f02a8f81239e660456da67'
'a32f6ba1f6254704c42c80098fb74e648d53271a27364014f6928067722e775b'
'c767678e286a44bc35c18536f2ed7e9fe4d7d0c812dfe024aa30c0d524112283'
'd0bf697fb73e3cc6e3b3e90448b5bc03903e129477d68f691f0dec1542acfc68')
'd0bf697fb73e3cc6e3b3e90448b5bc03903e129477d68f691f0dec1542acfc68'
'cfaf13b54c712df2a41dc18d3b9a4358afeecb2384673b2ec44167a7186e9943')

prepare() {
local patch
Expand Down Expand Up @@ -108,6 +110,8 @@ check() {
python3 "${startdir}/test-hide-cursor.py" "labwc-${_commit}"
# A hidden cursor gives no pointer focus (0008).
python3 "${startdir}/test-touch-pointer-focus.py" "labwc-${_commit}"
# The bottom swipe's ignore list (0009).
python3 "${startdir}/test-swipe-ignore-list.py" "labwc-${_commit}"
}

package() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
From dc39b24815a8032b4d18749bb8be64b426a89c32 Mon Sep 17 00:00:00 2001
From: Henrik Klee <henrik@goat-code.com>
Date: Fri, 20 Nov 2026 09:13:46 +0800
Subject: [PATCH] Ignore the bottom-edge swipe over any of several namespaces

bottomSwipeIgnoreNamespace named one layer-shell namespace, the
on-screen keyboard's, over which the bottom-edge swipe is left to the
surface. A shell's own sheets (a notification center, a control center)
need the swipe too, as their own drag that follows the finger instead
of the gesture's command firing at once. It takes a comma-separated
list now; a single name works as before.

Assisted-by: LLM
---
src/input/touch.c | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/src/input/touch.c b/src/input/touch.c
index 26e2d42..e81450c 100644
--- a/src/input/touch.c
+++ b/src/input/touch.c
@@ -112,10 +112,35 @@ bottom_swipe_output(double lx, double ly, struct output **lab_output)
return (struct bottom_swipe_box){box.x, box.y, box.width, box.height};
}

+/* Whether name is one of the comma-separated names in list. */
static bool
-bottom_swipe_ignored(struct output *output, const char *namespace)
+namespace_listed(const char *list, const char *name)
{
- if (!output || !namespace || !*namespace) {
+ size_t length = strlen(name);
+ const char *at = list;
+ while (*at) {
+ const char *end = strchr(at, ',');
+ size_t span = end ? (size_t)(end - at) : strlen(at);
+ if (span == length && !strncmp(at, name, length)) {
+ return true;
+ }
+ if (!end) {
+ break;
+ }
+ at = end + 1;
+ }
+ return false;
+}
+
+/*
+ * The swipe is left to the surface under it while a layer surface of one of
+ * the listed namespaces (comma-separated) is mapped: the on-screen keyboard
+ * takes it as typing, a shell sheet as its own drag.
+ */
+static bool
+bottom_swipe_ignored(struct output *output, const char *namespaces)
+{
+ if (!output || !namespaces || !*namespaces) {
return false;
}
for (size_t i = 0; i < ARRAY_SIZE(output->layer_tree); ++i) {
@@ -123,7 +148,7 @@ bottom_swipe_ignored(struct output *output, const char *namespace)
wl_list_for_each(node, &output->layer_tree[i]->children, link) {
struct lab_layer_surface *layer = node_layer_surface_from_node(node);
if (layer->mapped && layer->layer_surface->namespace
- && !strcmp(layer->layer_surface->namespace, namespace)) {
+ && namespace_listed(namespaces, layer->layer_surface->namespace)) {
return true;
}
}
--
2.54.0 (Apple Git-157)

41 changes: 41 additions & 0 deletions packages/labwc/tests/test-swipe-ignore-list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env python3
"""Compile the patched namespace list match against stubs (0009).

Run by check(): test-swipe-ignore-list.py SOURCE. bottomSwipeIgnoreNamespace
is a comma-separated list; a single name matches as before, and a name only
matches whole.
"""
from pathlib import Path
import re
import subprocess
import sys
import tempfile

source = Path(sys.argv[1])
touch = (source / 'src/input/touch.c').read_text()
match = re.search(r'static bool\nnamespace_listed\([^)]*\)\n\{', touch)
assert match, 'namespace_listed'
end = touch.index('{', match.start()) + 1
depth = 1
while depth:
if touch[end] == '{': depth += 1
if touch[end] == '}': depth -= 1
end += 1
fixture = '#include <assert.h>\n#include <stdbool.h>\n#include <string.h>\n' + touch[match.start():end] + r'''
int main(void) {
assert(namespace_listed("wvkbd", "wvkbd"));
assert(namespace_listed("wvkbd,omarchy-notification-center", "omarchy-notification-center"));
assert(namespace_listed("wvkbd,omarchy-notification-center,omarchy-control-center", "omarchy-control-center"));
assert(!namespace_listed("wvkbd,omarchy-notification-center", "omarchy-notification"));
assert(!namespace_listed("wvkbd", "wvkbd2"));
assert(!namespace_listed("", "wvkbd"));
return 0;
}
'''
with tempfile.TemporaryDirectory() as work:
c = Path(work) / 'listed.c'
c.write_text(fixture)
binary = Path(work) / 'listed'
subprocess.run(['cc', '-Wall', '-Werror', '-o', str(binary), str(c)], check=True)
subprocess.run([str(binary)], check=True)
print('swipe ignore list: ok')
Loading