Live data from Hacker News

Apple Mail randomly becomes the frontmost application in macOS

annoying.technology

131–140 of 178 posts

Re: Apple Mail randomly becomes the frontmost application in macOS

#132

I've had this issue for the past 2–3 years. It seems to happen because of improper error handling. If you look closely at the app in the instant it opens, your affected account will have a “disconnected” symbol next to it in the sidebar. However, it goes away before an error can be shown. My theory is: there is a momentary connection issue with these G Suite accounts, and Mail.app starts to show an error by focusing…

In my experience, if you always hide the Mail window (cmd-h) instead of closing it (cmd-w), it won't ever pop back up. Takes a while to retrain the muscle memory though! I haven't tested this in Catalina, but it definitely works consistently in Mojave.

Thanks a lot! I haven’t been bugged yet, but hope it works!! Would be a life saver when I need to watch full screen videos on VLC

Re: Apple Mail randomly becomes the frontmost application in macOS

#133
Where I work we don’t allow Apple Mail to run on corporate computers.

IT rolled out mandatory endpoint protection once, and they started getting reports of malware living in the Mail storage folder. Apparently when employees synced their corporate Gmail to Apple Mail, Apple Mail was pulling down the malicious/suspicious attachments from the Google spam folder. So I figure that’s a good reason why physical mail clients need to die. There’s no real need for them anymore.

Re: Apple Mail randomly becomes the frontmost application in macOS

#134
post #5

I’ve had this issue for a long time now across a couple of versions of MacOS and three Macs. It appears to be related to Google Calendar. My current workaround is to hide a Mail window with CMD-h. I’ve given up trying to report it or find a fix.

I second this. For me it seems to happen at very specific times, like 12AM so it leads me to believe it had to do with calendar events. And it always does it a few times in succession.

Re: Apple Mail randomly becomes the frontmost application in macOS

#135

Where I work we don’t allow Apple Mail to run on corporate computers. IT rolled out mandatory endpoint protection once, and they started getting reports of malware living in the Mail storage folder. Apparently when employees synced their corporate Gmail to Apple Mail, Apple Mail was pulling down the malicious/suspicious attachments from the Google spam folder. So I figure that’s a good reason why physical mail client…

Malware doesn’t harm your computer just by sitting around on the disk.

Re: Apple Mail randomly becomes the frontmost application in macOS

#136
post #113

Earlier quoted context omitted.

Mind you, a program with “hidden” windows open takes up more CPU/memory than a program without any windows open, because the view-controllers for those windows are still running, just bound to an invisible, non-updating view. (Though, admittedly, it’s less of a CPU cost than minimizing the window, since that requires the view to be kept active too, to facilitate updating the live thumbnail.) The main place this comes…

> Though, admittedly, it’s less of a CPU cost than minimizing the window, since that requires the view to be kept active too, to facilitate updating the live thumbnail. I thought that was a static thumbnail? > For example, Activity Monitor doesn’t suddenly stop using half your CPU when you hide it. It does for me, which is why I keep it hidden when I’m not actively using it.

> I thought that was a static thumbnail?

Nah, it updates (...as far as I can recall.) Try opening a chat client, minimizing the chat window, and then sending a message from another device to yourself.

I believe it’s just using the same call into the compositor that Mission Control uses to display your windows and spaces. Those are all live. (They might have a lower update rate, though.)

> It does for me, which is why I keep it hidden when I’m not actively using it.

Interesting. This might be down to Activity Monitor being written to respond to a message letting it know that its view is entirely obscured, and the Activity Monitor main-window view-controller deciding in response that there’s no point in it polling the system if all it’s going to do when re-visible is discard all the stuff it learned in the mean time and re-poll again to get the newest data for the view.

I can’t recall whether Activity Monitor has any historical/time-series views built in? If it does, then if you hide Activity Monitor with those active, it should keep using CPU, to gather the data for that view, whether it’s rendering it or not.

Re: Apple Mail randomly becomes the frontmost application in macOS

#137
post #10

I switched to Airmail for only this reason lol

Watch out. Last time I tried it, it was vulnerable to a bunch of issues similar to XSS. I suggest you test it with https://www.emailprivacytester.com/ and see if it still finds anything.

oh wow, thanks for the heads up!!

Re: Apple Mail randomly becomes the frontmost application in macOS

#138
If you have Microsoft Exchange accounts then you get a different bug. If you have no network connection or change network connections Apple Mail will thrash accountsd for long periods of time consuming as much of the CPU as it can. Neither Apple Mail nor accountsd appear to have any throttling of network connection attempts. Quitting Apple Mail until you have a network connection is the only option.

Re: Apple Mail randomly becomes the frontmost application in macOS

#140
post #60

Earlier quoted context omitted.

I confirm your observations. Yet, to force an app to the front when glitch in connection happens is more like a feature they deliriously thought is being useful, instead of choosing other means of notifications, which is plenty. An app is not forcing itself to the front without someone is specifically writing the code for it to do.

This smells like a feature built 10+ years ago, before notifications existed in Mac OS X, that never got upgraded. That's how apps "notified" back then.

Before the native notification system, there was this Growl thing that literally every single third-party app used. Apple apps, on the other hand...
Post reply on HN