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

Method getBar

wm/window_manager.go:1432–1454  ·  view source on GitHub ↗
(vals []byte)

Source from the content-addressed store, hash-verified

1430 cmd.Start()
1431}
1432func (wm *WindowManager) getBar(vals []byte) (int, int, int, int) {
1433 // calculates where the bar is (more explanitary in createTilingSpace)
1434
1435 var maxLeft, maxRight, maxTop, maxBottom int
1436 left := int(binary.LittleEndian.Uint32(vals[0:4]))
1437 right := int(binary.LittleEndian.Uint32(vals[4:8]))
1438 top := int(binary.LittleEndian.Uint32(vals[8:12]))
1439 bottom := int(binary.LittleEndian.Uint32(vals[12:16]))
1440
1441 if left > maxLeft {
1442 maxLeft = left
1443 }
1444 if right > maxRight {
1445 maxRight = right
1446 }
1447 if top > maxTop {
1448 maxTop = top
1449 }
1450 if bottom > maxBottom {
1451 maxBottom = bottom
1452 }
1453 return maxLeft, maxRight, maxTop, maxBottom
1454}
1455
1456func (wm *WindowManager) createTilingSpace() {
1457 // look at all windows and if it has the property _NET_WM_STRUT_PARTIAL (what most bars have) it means that it should be worked around

Callers 1

createTilingSpaceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected