Exemple #1
0
func clip(k *workspace) (int16, int16) {
	r := k.focusedFrame.rect
	if k.fullscreen || k.listing == listWorkspaces {
		r = k.mainFrame.rect
	}
	r.X, r.Y, r.Width, r.Height = r.X+2, r.Y+2, r.Width-3, r.Height-3
	check(xp.SetClipRectanglesChecked(
		xConn, xp.ClipOrderingUnsorted, desktopXGC, 0, 0, []xp.Rectangle{r}))
	return r.X, r.Y
}
Exemple #2
0
func unclip() {
	r := xp.Rectangle{X: 0, Y: 0, Width: desktopWidth, Height: desktopHeight}
	check(xp.SetClipRectanglesChecked(
		xConn, xp.ClipOrderingUnsorted, desktopXGC, 0, 0, []xp.Rectangle{r}))
}