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

Method setWindowDesktop

wm/window_manager.go:2071–2086  ·  view source on GitHub ↗
(win xproto.Window, desktop uint32)

Source from the content-addressed store, hash-verified

2069}
2070
2071func (wm *WindowManager) setWindowDesktop(win xproto.Window, desktop uint32) {
2072 atomWmDesktop, _ := xproto.InternAtom(wm.conn, true, uint16(len("_NET_WM_DESKTOP")), "_NET_WM_DESKTOP").Reply()
2073
2074 buf := new(bytes.Buffer)
2075 _ = binary.Write(buf, binary.LittleEndian, desktop)
2076
2077 xproto.ChangeProperty(wm.conn,
2078 xproto.PropModeReplace,
2079 win, // client window
2080 atomWmDesktop.Atom, // _NET_WM_DESKTOP
2081 xproto.AtomCardinal, // CARDINAL
2082 32,
2083 1,
2084 buf.Bytes(),
2085 )
2086}
2087
2088func shouldIgnoreWindow(conn *xgb.Conn, win xproto.Window) bool {
2089 // some windows don't want to be registered by the WM so we check that

Callers 2

RunMethod · 0.95
OnMapRequestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected