At least in the case of restarting wf-panel and reordering buttons in the window-list via drag-and-drop, clicking on a window-list button to toggle minimize uses the wrong target rect the first time around, after either of these actions. It might be best to use size_allocate to set the size and lookup the position, to ultimately call zwlr_foreign_toplevel_handle_v1_set_rectangle() directly before zwlr_foreign_toplevel_handle_v1_set_minimized().