--- a/src/shade.hpp +++ b/src/shade.hpp @@ -167,10 +167,13 @@ { if (auto toplevel = wf::toplevel_cast(view)) { - if (deco) + /* Re-resolve the decorator each frame: a cached observer_ptr dangles + * if the decoration is removed/recreated while the shade runs. */ + auto live_deco = toplevel->toplevel()->get_data(); + if (live_deco) { /* SSD */ - deco->get_margins(toplevel->toplevel()->pending()); + live_deco->get_margins(toplevel->toplevel()->pending()); } else { /* CSD */