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
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:
@@ -6,9 +6,11 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"hakurei.app/container/check"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/internal/acl"
|
||||
"hakurei.app/internal/dbus"
|
||||
"hakurei.app/internal/wayland"
|
||||
"hakurei.app/internal/xcb"
|
||||
)
|
||||
|
||||
@@ -45,6 +47,8 @@ type syscallDispatcher interface {
|
||||
// aclUpdate provides [acl.Update].
|
||||
aclUpdate(name string, uid int, perms ...acl.Perm) error
|
||||
|
||||
waylandNew(displayPath, bindPath *check.Absolute, appID, instanceID string) (*wayland.SecurityContext, error)
|
||||
|
||||
// xcbChangeHosts provides [xcb.ChangeHosts].
|
||||
xcbChangeHosts(mode xcb.HostMode, family xcb.Family, address string) error
|
||||
|
||||
@@ -76,6 +80,10 @@ func (k direct) aclUpdate(name string, uid int, perms ...acl.Perm) error {
|
||||
return acl.Update(name, uid, perms...)
|
||||
}
|
||||
|
||||
func (k direct) waylandNew(displayPath, bindPath *check.Absolute, appID, instanceID string) (*wayland.SecurityContext, error) {
|
||||
return wayland.New(displayPath, bindPath, appID, instanceID)
|
||||
}
|
||||
|
||||
func (k direct) xcbChangeHosts(mode xcb.HostMode, family xcb.Family, address string) error {
|
||||
return xcb.ChangeHosts(mode, family, address)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user