mogenson / PaperWM.spoon

Tiled scrollable window manager for MacOS
MIT License
442 stars 19 forks source link

Add window during tiling #10

Closed mogenson closed 1 year ago

mogenson commented 1 year ago

Sometimes the space is not valid when the windowVisible event callback is called, immediately after a new window is created. PaperWM:addWindow() will bail, but PaperWM:tileSpace() will try to tile this window when the windowFocused event callback happens, shortly afterwards. Since it appears that the window's space is valid once we get to this second callback, try to add the window during PaperWM:tileSpace() and see if the spaces match.