Hidden flyout resize fix.

This fixes an issue where flyouts would get resized while hidden and
then getting partially shown.
Merge pull request #295 from lukaspj/master

Hidden flyout resize fix