Unity game engine player going fullscreen fights for mode change
Moving from Ubuntu 18.04 to 20.04 using GNOME Flashback and Metacity broke several of my games. They exhibit the same mode fighting behavior described in issue #11. Affected games include Kerbal Space Program, Valheim, and Rise of Industry. They fail to start 90 percent of the time, either exiting or hanging.
Commit 993b8745 from Thu Mar 5 15:24:49 2020 fixed the regression introduced by the commit identified in issue #11 (closed) by waiting until idle to call check_decorated_cb. After observing that the games started more reliably with Metacity's logging enabled, I reasoned that a longer delay was needed.
The attached patch sets a 10ms delay instead of scheduling an event during the next idle time. In limited testing it has had good results. metacity_3.36.1_fix_for_unity_player_games.patch