Example #1
0
// _NET_WM_WINDOW_TYPE set
// This will create any atoms used in 'atomNames' if they don't already exist.
func WmWindowTypeSet(xu *xgbutil.XUtil, win xproto.Window,
	atomNames []string) error {

	atoms, err := xprop.StrToAtoms(xu, atomNames)
	if err != nil {
		return err
	}
	return xprop.ChangeProp32(xu, win, "_NET_WM_WINDOW_TYPE", "ATOM", atoms...)
}
Example #2
0
// _NET_SUPPORTED set
// This will create any atoms in the argument if they don't already exist.
func SupportedSet(xu *xgbutil.XUtil, atomNames []string) error {
	atoms, err := xprop.StrToAtoms(xu, atomNames)
	if err != nil {
		return err
	}

	return xprop.ChangeProp32(xu, xu.RootWin(), "_NET_SUPPORTED", "ATOM",
		atoms...)
}
Example #3
0
// WM_PROTOCOLS set
func WmProtocolsSet(xu *xgbutil.XUtil, win xproto.Window,
	atomNames []string) error {

	atoms, err := xprop.StrToAtoms(xu, atomNames)
	if err != nil {
		return err
	}
	return xprop.ChangeProp32(xu, win, "WM_PROTOCOLS", "ATOM", atoms...)
}
Example #4
0
// _NET_WM_ALLOWED_ACTIONS set
func WmAllowedActionsSet(xu *xgbutil.XUtil, win xproto.Window,
	atomNames []string) error {

	atoms, err := xprop.StrToAtoms(xu, atomNames)
	if err != nil {
		return err
	}

	return xprop.ChangeProp32(xu, win, "_NET_WM_ALLOWED_ACTIONS", "ATOM",
		atoms...)
}