示例#1
0
func main() {
	X, _ := xgbutil.NewConn()

	active, _ := ewmh.ActiveWindowGet(X)

	mh, err := motif.WmHintsGet(X, active)
	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Println(mh)
		fmt.Println("Does Chrome want decorations?",
			motif.Decor(X, active, mh))
	}
}
示例#2
0
文件: bools.go 项目: pascience/foci
// shouldDecor returns false if the client has requested no frames or
// has a type that implies it shouldn't be decorated.
func (c *Client) shouldDecor() bool {
	if c.PrimaryType() != TypeNormal {
		return false
	}
	if c.hasType("_NET_WM_WINDOW_TYPE_SPLASH") {
		return false
	}
	if c.fullscreen {
		return false
	}

	mh, err := motif.WmHintsGet(wm.X, c.Id())
	if err == nil && !motif.Decor(mh) {
		return false
	}

	return true
}