place_windows is accessing the gadgets allocation, so make sure to allocate the gadget before calling it.