-
-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS Sonoma shows an icon in the menubar with "AltTab is sharing your screen" #2606
Comments
In the menu bar there’s also an icon indicating that AlrTab is actively monitoring your screen which the icon was not there before the beta 2 update possibly due to newly deprecated APIs |
Screenshot for context, can't find a way to disable or hide it. Unsure if it warrants a separate issue, they may be related. |
Same issue here. I've updated to the latest update but have this icon constantly |
I already closed these duplicates:
This time, I'll keep this ticket open so people can hopefully see it and stop creating new tickets. Now regarding the topic itself: a beta is unstable software. Let's wait for Sonoma to go live to discuss if there are things to deal with, for AltTab. Hopefully by then, Apple will have fixed their issues. |
Interesting take on the issue, a developer beta is for developers to first optimise and fix their apps for the upcoming releases instead of starting to work on it after public release drops |
@lockieluke previous macOS beta have introduced similar issues in the past, which they then fixed before the end of the beta. That's what I mean by unstable. Apple develops the OS actively during the beta. For Sonoma, it seems they are working on various UIs to share info about the app to the users. These UI elements look obnoxious and most big apps would display it, so I wouldn't be surprised that it all goes away before the end of the beta. Please keep in mind #1179. I want to minimize the work on AltTab's side, so it makes sense to wait for Apple to be done moving things around until I try my best at fixing what they broke. |
Fair, but closing issues typically delays progress, especially in a situation like this where it seems Apple is providing a notice. For anyone looking for a place to start, I think the deprecated method may be 'activate(ignoringOtherApps:)', though I'm not super confident that's solely responsible for the alert since I have minimal exposure to AppKit development. I found that Apple's documentation has it listed as deprecated in 14.0, and it appears in the codebase a few times. |
This appears to be an intentionally deprecated API, not a bug. In fact, it was already deprecated in Ventura, but it could still be used if your app targets a lower version.
https://developer.apple.com/documentation/macos-release-notes/macos-14-release-notes#ATS-and-ATSUI |
I guess the screen sharing and the deprecated method are 2 different issues. The deprecated API, which throws the error popup has to be fixed before public release of macOS 14. The issue with the screen sharing could be tuned on Apples side before fall. Regarding the deprecated method: |
It might be possible to use Edit: strike that. There are only |
There's a hidden API that supposedly has the same functionality as the deprecated |
I have also faced the deprecated API message in my app BetterTouchTool. I'm pretty sure it's not caused by the activateIgnoringOtherApps method. Way too many apps are using that method to just deprecate and remove it like this. |
I believe you should be using https://developer.apple.com/documentation/coregraphics/3656523-cgpreflightscreencaptureaccess |
Yes, but this API is not a full replacement. It doesn't update while the app is started and also it is incorrectly marked as available on macOS 10.15 - which will just crash your app if you try to use it on that macOS version. |
Absolutely. I tried to use it in the past as it looks on paper like the proper way to do things, but the hacky alternative we use today is more robust and more flexible. |
Not sure if it grants a separate issue, but on MacOS Sonoma, they've also updated UI for a language switcher. For some reason, AltTab detects it as a separate window, and shows in the app list. It doesn't go away ever, once you switch a language this way once. |
Hi @caffeinum, There was an issue with the new language-switch UI. They fixed it in a later beta release. They will probably continue working on / fixing this feature. Let's review it when Sonoma goes live. |
I believe it is safe to say that the issues can be addressed now, seeing as Sonoma goes public Sept. 18th. |
@lwouis Don’t worry, the official stable release will arrive within this week :) |
@lwouis You can easily upgrade by searching in the |
Anyone knows what this new UI is meant to do? AltTab needs Screen Recording permissions for its operations. Without it, we can't get screenshots of the windows to show the user. We can't even get the window names. This new UI seems to imply that we are constantly recording the screen, which is not the case. We take screenshots of windows when they change (resized, moved, minimized, etc). I don't understand what the idea is with this new UI. Maybe it's intended that AltTab is shown there? Maybe Apple's implementation shouldn't trigger here since we are not constantly recording like a video stream? Is there any documentation from Apple somewhere which explains their intent with this new UI system? |
I think Apple intents for it to be like this. It goes away after a while when not doing any screen captures for some time. There is no (non-hacky) way to hide that UI, it's part of the Control Center process. Accessing meta information about windows does not trigger the icon to be shown though (at least in my apps), AFAIK it's just real captures that make it show up. It's stupid, there should at least be an option to exclude apps from it - especially as it doesn't improve security at all. However this is feedback that needs to go to Apple. I filed it as FB13205878 |
Why not just when pressing the alt-tab shortcut? |
@lwouis I compiled AltTab with those APIs swapped out and the indicator still shows up (inconsistently). It's really weird that Hammerspoon doesn't trip the indicator at all though. I haven't gotten the time to do an in-depth investigation, but I figure it might have something to do with the frequency of the API calls? Based on the tip from @fifafu that the code responsible for this is located in Control Center, I'd like to pop |
If you disable SIP, you could actually make patches to the ControlCenter binary to disable the indicator for AltTab, with root access. This of course opens up security vulnerabilities but if the indicator annoys you that bad, maybe it's worth it, I don't know. I probably wouldn't do it myself. (Though I have temporarily disabled SIP in the past to do dynamic analysis on macOS system binaries 😅.) |
Just based on this basic smoke test, it seems very likely that this is indeed the binary responsible for the indicator :) |
Not sure what happened, but I'm running macOS 14.2.1 and right now the indicator doesn't seem to appear anymore when using AltTab. |
Hmm, it is weird, I am currently on 14.2.1 too but the indicator still appears occasionally |
As someone mentioned in that thread, i believe that Apple has patched their purple indicator over time. It used to trigger exactly on usage of the APIs. Now it seems to trigger on a more complex logic. Probably some kind of heuristic to show it when an app does it the first time, but then only show it after a certain time if the app spam calls. So in the case of AltTab, we see it only occasionally these days. This is what people here mostly wanted so i guess Apple improved things. |
If an app (like AltTab) needs to grab part of the screen (to generate a thumbnail for the selected window) it will report to macOS that it is recording your screen (because it is). This is normal behavior. Doesn't mean I like the big giant purple square Apple chose (a dot would have sufficed), but I am still shocked this is still an issue. Disable thumbnails to make it go away. |
I imagine for most people, myself included, the main appeal of the app is the thumbnails. |
I found a way to allow user-specified apps to bypass the indicator without creating new security issues or disabling SIP, but unfortunately it's (tangentially) related to a security issue I reported to Apple, so I don't want to risk talking about it just yet. I'll post an update when I get a response from Apple. (The fix for this issue won't prevent the method I found from working.) |
Every month I check this thread for any new messages, and I still use MacOS 13.2 because of this. Disappointing to Apple for such a thing. |
Hey all, Apple has unfortunately been quite slow to respond, so in the meantime I thought I would share another method of running AltTab without activating the indicator. Paste this into Apple Terminal (not a third party terminal):
Then grant Terminal screen recording permission. It's not automated, but it works for the time being. I'm still waiting on Apple and I'll provide a better solution when they get back to me. |
So by manually giving the screen recording permission via the terminal, the system does not indicate that anymore? |
The one you provided already works perfectly, thank you! I wanted it to autostart with my mac so I made a # alttab.command
screen -dmS AltTab /Applications/AltTab.app/Contents/MacOS/AltTab
As far as how it works, I guess Apple allows Apple's own apps to bypass the sharing icon, which is why, e.g. Screenshot.app doesn't activate it. Fingers crossed they don't remove it. I cannot see why they would do such a thing, because only advanced users would take advantage of this. @lwouis Did you see this? |
Seconding the workaround - I added a startup trigger on BTT to execute the terminal command @Duc-NSH posted and it's been working perfectly. Thank you so much! |
Does this disable the purple screen-recording notification icon or does it just keep it on permanently? |
It prevents the purple icon from showing up at all |
I have a script for auto starting AltTab:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.alttab</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
<string>-c</string>
<string>/usr/bin/osascript $HOME/Scripts/alttab.scpt</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
tell application "Terminal"
do script "screen -dmS AltTab /Applications/AltTab.app/Contents/MacOS/AltTab"
delay 1.5
if it is running then quit
end tell
|
@lockieluke This solution doesn't seem to be working for me anymore. Is it still working for you, and if not, is there a new workaround? |
Still working for me. |
Here is a bit improved version of @lockieluke's solution: https://gist.github.com/mikluko/4618cc2f69bbb09d26d02f99a2897b66 How to use: Boot out the existing launchd agent (if you have one):
Install the new launchd agent:
|
I'm using displaylink which also have this annoying flickering purple icon "xxx is recording" thing. I modify your code a bit, so that when the command finished running, the Terminal got killed. Also I have to specify the architecture else it will fail to execute. The app is a universal binary, I have no idea why I have to specify the architecture for it to run. # displaylink.command
# System preferences > Login items > + > `displaylink.command`
screen -dmS displaylink arch -arm64 /Applications/DisplayLink\ Manager.app/Contents/MacOS/DisplayLinkUserAgent; killall Terminal Also don't forget to make the file executable by |
@nendonerd's solution also works with the competing SiliconMotion InstantView application for their line of adapters, with the added caveat that you need to use the version of the app that lives in
This is essential to prevent the screen recording icon from randomly flashing on and off as Apple's heuristics struggle to understand the concept of a userspace display adapter driver (the only allowed kind). |
@nendonerd Does this work with the most recent 1.10+ version? Running manually via
Errors with |
Describe the bug
Alert on boot after updating to Sonoma Developer Beta (14.0):
Screenshots / video
Steps to reproduce the bug
Your environment
The text was updated successfully, but these errors were encountered: