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_position
and 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 hide
instead.
This works with exclusive dialogs as well. Cheers