Bug 1021270 - Focus the top active window while permission dialog hide

:'( ... I wonder if there is a better pattern here.