internal/wayland: reimplement connect/bind code
All checks were successful
Test / Create distribution (push) Successful in 36s
Test / Sandbox (push) Successful in 2m13s
Test / Hakurei (push) Successful in 3m18s
Test / Hpkg (push) Successful in 4m9s
Test / Sandbox (race detector) (push) Successful in 4m14s
Test / Hakurei (race detector) (push) Successful in 5m7s
Test / Flake checks (push) Successful in 1m26s

The old implementation is relocated to system/wayland/deprecated.go.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-11-16 01:23:16 +09:00
parent fe40af7b7e
commit 61972d61f6
10 changed files with 254 additions and 267 deletions

View File

@@ -33,7 +33,7 @@ static const struct wl_registry_listener registry_listener = {
hakurei_wayland_res hakurei_bind_wayland_fd(
char *socket_path,
int fd,
int server_fd,
const char *app_id,
const char *instance_id,
int close_fd) {
@@ -47,7 +47,7 @@ hakurei_wayland_res hakurei_bind_wayland_fd(
struct sockaddr_un sockaddr = {0};
struct wp_security_context_v1 *security_context;
display = wl_display_connect_to_fd(fd);
display = wl_display_connect_to_fd(server_fd);
if (display == NULL) {
res = HAKUREI_WAYLAND_CONNECT;
goto out;