top minimize, maximize & close buttons aren't working but only for mac apps in the background
I have been able to click the minimize, maximize & close buttons on all open apps that are in the background (app window is behind another active window) but for some reason I can only use the buttons on non-mac apps. Safari, Mail, iMessages, iTunes, etc won't minimize or close in the background. When I click any of the top buttons they will turn red, yellow, green and stay "on" but the buttons won't do what they should do. I have tried using the button on non-mac apps and the buttons work when the apps are in the background without activating the window by clicking the top bar. The Mac apps require me to click the top bar first or commad+tab the app to be active before the top bars will work. Also, the mac apps won't become active unless I click somewhere on the frame of the window but when I have them open in the background and click inside the window to acitvate them they don't respond. Is there a setting that I messed up somewhere? My wife's mac doesn't have this issue and I have all my setting that I can think of set the same but it hasn't changed the behavior. I did an OS re-install and it didn't fix it either. Anyone have an idea on what I can do to fix this?
iMac, macOS Sierra (10.12.3)