jbuchermn / newm

Wayland compositor
MIT License
959 stars 30 forks source link

Layout: patch self.__class__ if layout.py was reloaded() #122

Closed cben closed 2 years ago

cben commented 2 years ago

This refactor matters if config file reload()s layout.py module, AND live-patches the Layout instance to use new code. (Which is doable, see #120 for WIP recipes.)

Previously, old _setup() code would run to completion, because it's already inside that function. A second config reload would be needed. Now, new _setup() code may take effect immediately. The code also got a tiny bit simpler.

jbuchermn commented 2 years ago

Thanks a lot!