registerForKeyEvents(xconn, xroot, keymap)
becomeWM(xconn, xroot)
// Build a list of windows needing management ------------------------------
registerForKeyEvents(xconn, xroot, keymap)
becomeWM(xconn, xroot)
// Build a list of windows needing management ------------------------------
if len(attachedScreens) > 0 {
fmt.Println("The Go compiler is waaaaay too picky about unused variables...")
}
if len(attachedScreens) > 0 {
fmt.Println("The Go compiler is waaaaay too picky about unused variables...")
}
//workspaces = make(map[string]*Workspace)
//defaultw := &Workspace{mu: &sync.Mutex{}}
for _, c := range tree.Children {
//workspaces = make(map[string]*Workspace)
//defaultw := &Workspace{mu: &sync.Mutex{}}
for _, c := range tree.Children {
// `MapState` value of 2 should be viewable. TODO: Verify this.
// - https://github.com/BurntSushi/xgb/blob/master/xproto/xproto.go#L3772
// - https://github.com/BurntSushi/xgb/blob/master/xproto/xproto.go#L10287
// `MapState` value of 2 should be viewable. TODO: Verify this.
// - https://github.com/BurntSushi/xgb/blob/master/xproto/xproto.go#L3772
// - https://github.com/BurntSushi/xgb/blob/master/xproto/xproto.go#L10287
-func isMappedWindow(windowID xproto.Window) bool {
- reply, err := xproto.GetWindowAttributes(xc, windowID).Reply()
+func isMappedWindow(conn *xgb.Conn, windowID xproto.Window) bool {
+ reply, err := xproto.GetWindowAttributes(conn, windowID).Reply()
// event handlers (like this keypress handler). It shouldn't grow too
// fragmented, nor should it grow into a monolithic beast, but the balance
// needs to be selected after the handlers are built out more completely.
// event handlers (like this keypress handler). It shouldn't grow too
// fragmented, nor should it grow into a monolithic beast, but the balance
// needs to be selected after the handlers are built out more completely.
// We must manually close the X connection since we used
// `defer` when setting it up and os.Exit() short-circuits
// that deferral.
// We must manually close the X connection since we used
// `defer` when setting it up and os.Exit() short-circuits
// that deferral.