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

Method enableTiling

wm/window_manager.go:1606–1627  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1604}
1605
1606func (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
1629func (wm *WindowManager) toggleFullScreen(Child xproto.Window) {
1630 win := wm.windows[Child]

Callers 3

RunMethod · 0.95
toggleTilingMethod · 0.95
switchWorkspaceMethod · 0.95

Calls 3

createTilingSpaceMethod · 0.95
fitToLayoutMethod · 0.95
setNetWorkAreaMethod · 0.95

Tested by

no test coverage detected