| 1430 | cmd.Start() |
| 1431 | } |
| 1432 | func (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 | |
| 1456 | func (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 |