Menu: Ensure menus are closed when parent window is activated.

Bug: Launch any menu. Hover mouse over the menu and now click any
part of the titlebar. We expect the menu to close but currently
it doesn't. The issue here is that parent window, which is also
the current dispatcher didn't release the capture. This patch fixes
it.