fix: restore libwayland redox.patch to working state, update docs

- Reverted redox.patch to original 39-line version (build-tested)
- Documented libwayland→qtbase→kded6 build dependency chain
- Updated WAYLAND-IMPLEMENTATION-PLAN.md to v2.1
- Deleted 45 stale .bak patch files
- pkgar restored from packages/ backup
This commit is contained in:
2026-05-06 14:39:55 +01:00
parent 25447eac3e
commit b66431cbbe
2 changed files with 21 additions and 29 deletions
+20 -1
View File
@@ -1,5 +1,5 @@
# Red Bear OS Wayland Implementation Plan
**Version:** 2.0 (2026-05-06)
**Version:** 2.1 (2026-05-06)
**Status:** Canonical Wayland subsystem plan — **Wayland-only path, no framebuffer workarounds**
## Architecture Decision (2026-05-06)
@@ -154,3 +154,22 @@ Hardware DRM/KMS rendering depends on `redox-drm` driver maturity.
Success criterion: `redbear-compositor: client 65536 connected` followed by
`redbear-compositor: dispatch` (not a page fault).
### Build Dependency Chain (Critical, discovered 2026-05-06)
When modifying libwayland source or `local/patches/libwayland/redox.patch`, the
full chain must be rebuilt:
```
libwayland recipe → repo/x86_64-unknown-redox/libwayland.pkgar
qtbase recipe → copies pkgar into sysroot → links Qt6 Wayland QPA
kf6-kded6 recipe → links against qtbase/sysroot/libwayland-client.a
```
**Failure mode**: Modifying only libwayland does NOT update qtbase's static copy
of `libwayland-client.a`. The old binary persists in qtbase's sysroot. All
three recipes must be force-rebuilt (delete `target/` directories) AND the
repo pkgar cache must be regenerated.
**Recovery**: If `repo/x86_64-unknown-redox/libwayland.pkgar` is deleted, a
backup exists at `packages/x86_64-unknown-redox/libwayland.pkgar`.
+1 -28
View File
@@ -36,31 +36,4 @@
+}
#include <sys/file.h>
#include <sys/stat.h>
+--- a/src/wayland-client.c
++++ b/src/wayland-client.c
+@@ -649,6 +649,11 @@
+ wl_proxy_add_listener(struct wl_proxy *proxy,
+ void (**implementation)(void), void *data)
+ {
++ if (!proxy) {
++ fprintf(stderr, "FATAL: wl_proxy_add_listener(NULL) caller=%p -- returning error\n",
++ __builtin_return_address(0));
++ return -1;
++ }
+ if (proxy->flags & WL_PROXY_FLAG_WRAPPER)
+ wl_abort("Proxy %p is a wrapper\n", proxy);
+
+@@ -2448,6 +2453,7 @@
+ wl_proxy_get_version(struct wl_proxy *proxy)
+ {
++ if (!proxy) return 0;
+ return proxy->version;
+ }
+
+@@ -2566,6 +2572,7 @@
+ wl_proxy_get_display(struct wl_proxy *proxy)
+ {
++ if (!proxy) return NULL;
+ return proxy->display;
+ }