()
| 1604 | } |
| 1605 | |
| 1606 | func (wm *WindowManager) enableTiling() { |
| 1607 | wm.currWorkspace.tiling = true |
| 1608 | // make sure no windows are fullscreened and that there state is saved (so it can be restored later if/when the user disables tiling) |
| 1609 | for i, window := range wm.currWorkspace.windowList { |
| 1610 | fmt.Println(window.id) |
| 1611 | attr, _ := xproto.GetGeometry(wm.conn, xproto.Drawable(window.id)).Reply() |
| 1612 | wm.currWorkspace.windowList[i] = &Window{ |
| 1613 | id: window.id, |
| 1614 | X: int(attr.X), |
| 1615 | Y: int(attr.Y), |
| 1616 | Width: int(attr.Width), |
| 1617 | Height: int(attr.Height), |
| 1618 | Fullscreen: false, |
| 1619 | Client: window.Client, |
| 1620 | } |
| 1621 | } |
| 1622 | fmt.Println("tiling") |
| 1623 | // put the windows in the right tiling layout in the right space |
| 1624 | wm.createTilingSpace() |
| 1625 | wm.fitToLayout() |
| 1626 | wm.setNetWorkArea() |
| 1627 | } |
| 1628 | |
| 1629 | func (wm *WindowManager) toggleFullScreen(Child xproto.Window) { |
| 1630 | win := wm.windows[Child] |
no test coverage detected