I'm using PyCharm 2017.1 on Mac OSX 10.11.6 (El Capitan). I use the "Hot Corners" function of OSX to bring up Mission Control when I move my mouse pointer to the top right corner of my screen. This lets me quickly switch to, say, a Terminal window, or back to PyCharm.
My workflow is to use PyCharm for code editing, but to run code from Terminal (I choose not to run within PyCharm for good reasons in this project).
I have "Synchronize files on frame or editor tab activation" enabled, and "Save files on frame deactivation" enabled.
In Terminal I have used "defaults write com.apple.Terminal FocusFollowsMouse -string YES" to enable "Focus follows mouse" - this allows interaction with a Terminal window by simply moving the mouse over it, rather than clicking to select it. This means I can work in a partially hidden Terminal without having to bring it to the "front", which is very handy (and something I've done for years with Linux desktops).
The problem is that PyCharm is not automatically saving my edits when I use the Hot Corner + Mission Control to change to Terminal. Although focus does switch to the Terminal window, I don't think PyCharm is receiving the notification that focus has been lost, so it's not saving my changes. If I alt-tab or click away, it does save them. Or I can manually save with cmd+S if I remember.
If I turn off "Focus follows mouse" with "defaults write com.apple.Terminal FocusFollowsMouse -string NO" and relaunch Terminal, the problem does not occur, so this makes me think it's an interaction between PyCharm and Terminal.
Is there a solution to this problem without disabling "focus follows mouse" in Terminal? I do a similar thing on Linux (hot corner with compiz "show all windows") and it works fine there.