diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-17 19:07:53 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-17 19:07:53 +0900 |
| commit | 38a3e6af03e638f82f72e5659588eaf17c78aafa (patch) | |
| tree | caf550bcf572b9132fd7f813b4e4d3857f9c1bd5 /system/internal/xcb/export.go | |
| parent | 90cb01b2748550228d0bc179691a19ebb996fc36 (diff) | |
system: make xcb internal
This package is hauntingly ugly. Move this to internal until it is removed or replaced.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'system/internal/xcb/export.go')
| -rw-r--r-- | system/internal/xcb/export.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/system/internal/xcb/export.go b/system/internal/xcb/export.go new file mode 100644 index 00000000..1ed9997f --- /dev/null +++ b/system/internal/xcb/export.go @@ -0,0 +1,22 @@ +// Package xcb implements X11 ChangeHosts via libxcb. +package xcb + +import ( + "errors" +) + +var ErrChangeHosts = errors.New("xcb_change_hosts() failed") + +func ChangeHosts(mode HostMode, family Family, address string) error { + var conn *connection + + if c, err := connect(); err != nil { + c.disconnect() + return err + } else { + defer c.disconnect() + conn = c + } + + return conn.changeHostsChecked(mode, family, address) +} |
