Add Multi Window support.

This patch adds support to handle multiple windows, i.e. popups or
new window etc. This patch doesn't handle the positioning of
child windows.