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>
This commit is contained in:
22
system/internal/xcb/export.go
Normal file
22
system/internal/xcb/export.go
Normal file
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user