Backported 3 cherrypicked Mutter 3.5.91 changes to Muffin to fix bug https://github.com/linuxmint/Cinnamon/issues/698.

The public Gnome bug https://bugzilla.gnome.org/show_bug.cgi?id=673370 has the full issue description, tests to trigger the issue and a working temporary workaround.
This issue also applies to Muffin as it has been forked from Mutter 3.2.1 and we have seen the issue with xscreensaver, gnome-screensaver and cinnamon-screensaver.
The backported changes originate from bug https://bugzilla.gnome.org/show_bug.cgi?id=677116 which fixes an issue with how unredirected windows are handled.