diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-10-20 22:54:47 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-10-21 18:46:06 +0900 |
| commit | 380d1f45851b7dffb963c51da96a17ba41f3cfb8 (patch) | |
| tree | 984c9b50d890157847e3f3bc942659e6431c03a9 /internal/app/share.display.go | |
| parent | 133f23e0de77dc32de2753b23ed8173344a0e699 (diff) | |
app: move wayland mediation to shim package
Values used in the Wayland mediation implementation is stored in various struct fields strewn across multiple app structs and checks are messy and confusing. This commit unifies them into a single struct and access it using much better looking methods.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/app/share.display.go')
| -rw-r--r-- | internal/app/share.display.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/app/share.display.go b/internal/app/share.display.go index 7c50b636..18fad7a7 100644 --- a/internal/app/share.display.go +++ b/internal/app/share.display.go @@ -34,7 +34,7 @@ func (seal *appSeal) shareDisplay() error { if wd, ok := os.LookupEnv(waylandDisplay); !ok { return fmsg.WrapError(ErrWayland, "WAYLAND_DISPLAY is not set") - } else if seal.wlDone == nil { + } else if seal.wl == nil { // hardlink wayland socket wp := path.Join(seal.RuntimePath, wd) wpi := path.Join(seal.shareLocal, "wayland") @@ -46,8 +46,8 @@ func (seal *appSeal) shareDisplay() error { // ensure Wayland socket ACL (e.g. `/run/user/%d/wayland-%d`) seal.sys.UpdatePermType(system.EWayland, wp, acl.Read, acl.Write, acl.Execute) } else { - // set wayland socket path (e.g. `/run/user/%d/wayland-%d`) - seal.wl = path.Join(seal.RuntimePath, wd) + // set wayland socket path for mediation (e.g. `/run/user/%d/wayland-%d`) + seal.wl.Path = path.Join(seal.RuntimePath, wd) } } |
