mutter drops input focus when removing window decorations
If an application removes window decorations via _MOTIF_WM_HINTS, mutter causes that window to lose its input focus. This seems to be because XReparentWindow in <src/core/frame.c:meta_window_destroy_frame> causes an unmap, which then causes the focus loss. Mutter doesn't attempt to re-give focus back to the window which lost it.
<src/core/window.c:meta_window_show> may be a good place to solve this. Removing the check for showing_for_first_time appears to fix the problem for me, but it probably needs more thought than that.
This causes some games run through Wine to lose focus when changing into fullscreen mode.
I've attached a small program to reproduce the issue.