aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/system/dispatcher.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-11-16 01:23:16 +0900
committerOphestra <cat@gensokyo.uk>2025-11-16 01:23:16 +0900
commit61972d61f650be2fb86eb2ead452b74c02b3e00f (patch)
treeca86e8190a1de3eb64ed367acaa428521bbc5b87 /internal/system/dispatcher.go
parentfe40af7b7e95356b7d88e35941097edc9700f093 (diff)
internal/wayland: reimplement connect/bind code
The old implementation is relocated to system/wayland/deprecated.go. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/system/dispatcher.go')
-rw-r--r--internal/system/dispatcher.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/system/dispatcher.go b/internal/system/dispatcher.go
index 1ea9f108..656487dd 100644
--- a/internal/system/dispatcher.go
+++ b/internal/system/dispatcher.go
@@ -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)
}