aboutsummaryrefslogtreecommitdiff
path: root/nexgb/examples/seq-wrap.go
blob: b5bc834b6c5d8194843214d8be1a2de5ca298314 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package main

import (
	"fmt"

	"github.com/BurntSushi/xgb"
)

func main() {
	X, _ := xgb.NewConn()

	aname := "_NET_ACTIVE_WINDOW"

	for i := 1; i <= 1<<16 + 10; i++ {
		atom, err := X.InternAtom(true, uint16(len(aname)), aname).Reply()
		if err != nil {
			fmt.Println(err)
		} else {
			fmt.Printf("%d. Sequence: %d, Atom: %d\n",
				i, atom.Sequence, atom.Atom)
		}
	}
}