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

Method OnMapRequest

wm/window_manager.go:2191–2213  ·  view source on GitHub ↗
(event xproto.MapRequestEvent)

Source from the content-addressed store, hash-verified

2189}
2190
2191func (wm *WindowManager) OnMapRequest(event xproto.MapRequestEvent) {
2192
2193 // if there is a window to be ignored then we just map it but don't handle it
2194 if shouldIgnoreWindow(wm.conn, event.Window) {
2195 fmt.Println("ignored window since it is either dock, splash, dialog or notify")
2196 err := xproto.MapWindowChecked(
2197 wm.conn,
2198 event.Window,
2199 ).Check()
2200 if err != nil {
2201 slog.Error("Couldn't create new window id", "error:", err.Error())
2202 }
2203 return
2204 }
2205
2206 // frame the window and make sure to work out the new tiling layout
2207 wm.Frame(event.Window, false)
2208 if wm.currWorkspace.tiling {
2209 wm.fitToLayout()
2210 }
2211
2212 wm.setWindowDesktop(event.Window, uint32(wm.workspaceIndex))
2213}
2214
2215func (wm *WindowManager) Frame(w xproto.Window, createdBeforeWM bool) {
2216

Callers 1

RunMethod · 0.95

Calls 4

FrameMethod · 0.95
fitToLayoutMethod · 0.95
setWindowDesktopMethod · 0.95
shouldIgnoreWindowFunction · 0.85

Tested by

no test coverage detected