(event xproto.MapRequestEvent)
| 2189 | } |
| 2190 | |
| 2191 | func (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 | |
| 2215 | func (wm *WindowManager) Frame(w xproto.Window, createdBeforeWM bool) { |
| 2216 |
no test coverage detected