completioncontainer: calculate maximum size based on window position.

We can only do this if the window has been realized and we have it's
offset compared to the origin.

https://bugzilla.gnome.org/show_bug.cgi?id=706467