
Bailing out of _sync() early if the application lost keyboard focus to the shell can only be done on actual application focus changes. In particular, doing this check on a switch to an empty workspace while the keyboard focus is already on the shell prevents the AppMenuButton from being hidden as it should. https://bugzilla.gnome.org/show_bug.cgi?id=672011