A widget being hidden must remove its focus grab with GTK+, otherwise GTK+
would continue sending all input messages to it but fail to process them
because the widget is not realized any more, resulting in a complete freeze of
the entire program.
Do it when detaching menus from menubar and menubar from the frame to fix just
such a problem in case SetMenuBar() was called while the previous menubar was
opened.
Closes #15221.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74056
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775