(win *Window, Child xproto.Window)
| 1638 | } |
| 1639 | |
| 1640 | func (wm *WindowManager) disableFullscreen(win *Window, Child xproto.Window) { |
| 1641 | fmt.Println("DISABLING FULL SCREEN") |
| 1642 | wm.windows[Child].Fullscreen = false |
| 1643 | for i, window := range wm.currWorkspace.windowList { |
| 1644 | if window.id == Child { |
| 1645 | wm.currWorkspace.windowList[i].Fullscreen = false |
| 1646 | } |
| 1647 | fmt.Println(window.Fullscreen) |
| 1648 | } |
| 1649 | // set the frame back to what it used to be same with the client, but sort out tiling layout anyway just in case |
| 1650 | err := xproto.ConfigureWindowChecked( |
| 1651 | wm.conn, |
| 1652 | Child, |
| 1653 | xproto.ConfigWindowX|xproto.ConfigWindowY| |
| 1654 | xproto.ConfigWindowWidth|xproto.ConfigWindowHeight|xproto.ConfigWindowBorderWidth, |
| 1655 | []uint32{uint32(win.X), uint32(win.Y), uint32(win.Width), uint32(win.Height), wm.config.BorderWidth}, |
| 1656 | ).Check() |
| 1657 | if err != nil { |
| 1658 | slog.Error("couldn't un fullscreen window", "error: ", err) |
| 1659 | } |
| 1660 | wm.fitToLayout() |
| 1661 | } |
| 1662 | |
| 1663 | func (wm *WindowManager) fullscreen(win *Window, Child xproto.Window) { |
| 1664 | // set window state so it can be restored later then configure window to be full width and height, sam with client, also take away border |
no test coverage detected