MCPcopy Create free account
hub / github.com/BobdaProgrammer/doWM / setNetClientList

Method setNetClientList

wm/window_manager.go:1940–1957  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1938}
1939
1940func (wm *WindowManager) setNetClientList() {
1941 atomClientList, _ := xproto.InternAtom(wm.conn, true, uint16(len("_NET_CLIENT_LIST")), "_NET_CLIENT_LIST").Reply()
1942
1943 buf := new(bytes.Buffer)
1944 for _, info := range wm.windows {
1945 _ = binary.Write(buf, binary.LittleEndian, info.Client)
1946 }
1947
1948 xproto.ChangeProperty(wm.conn,
1949 xproto.PropModeReplace,
1950 wm.root,
1951 atomClientList.Atom,
1952 xproto.AtomWindow,
1953 32,
1954 uint32(len(wm.windows)),
1955 buf.Bytes(),
1956 )
1957}
1958func (wm *WindowManager) OnEnterNotify(event xproto.EnterNotifyEvent) {
1959 // set focus when we enter a window and change border color
1960 err := xproto.SetInputFocusChecked(wm.conn, xproto.InputFocusPointerRoot, event.Event, xproto.TimeCurrentTime).Check()

Callers 2

UnFrameMethod · 0.95
FrameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected