I wanted to add to this since I've been banging my head on a related problem.
If you are using
show instead of
popup, you can use
set_size prior to showing to position the window properly.
When you hide the window, instead of reacting to the
hide_popup signal, you have to react to
This works with exclusive dialogs as well. Cheers