lwouis / alt-tab-macos

Windows alt-tab on macOS
https://alt-tab-macos.netlify.app
GNU General Public License v3.0
10.21k stars 318 forks source link

Screen capture dialog on every AltTab launch #3183

Closed ProjectTermina closed 1 week ago

ProjectTermina commented 5 months ago

Describe the bug

On macOS Sonoma 14.4 Beta, macOS displays a dialog box on every AltTab startup that says "Allow screen capture in AltTab?" Apps using ScreenCaptureKit will not receive these additional prompts in macOS 14.4.

Screenshots / video

Screenshot 2024-02-16 at 11 41 56 AM

video: https://uofi.box.com/s/s9erpblmg2g89jgt5d7k4vtos6emek85

Steps to reproduce the bug

  1. Launch AltTab on affected OS version

Your environment

lwouis commented 5 months ago

Hi @ProjectTermina,

Thank you for reporting this issue.

I'm not sure what can be done about this. It's a terrible news. Apple is going to create frustrated users once again.

Apps using ScreenCaptureKit will not receive these additional prompts in macOS 14.4.

Could you please clarify exactly which API triggers the prompt? Maybe there is reference material from Apple you could share?

We use various APIs to grab screenshots of window, but also window titles, etc. I'm not sure which calls we would need to replace. For instance, using ScreenCaptureKit to list windows and get their titles [has big limitations I reviewed](Apps using ScreenCaptureKit will not receive these additional prompts in macOS 14.4.).

Thank you 🙇

ProjectTermina commented 5 months ago

The WWDC presentation of ScreenCaptureKit specifically called out CGDisplayStream and CGWindowList. Unfortunately there is no official communication from Apple on the upcoming 14.4 release. @lwouis

ProjectTermina commented 5 months ago

The Core Graphics docs, specifically under Quartz Display Services and Quartz Window Services, might be helpful: https://developer.apple.com/documentation/coregraphics/

There is also a possibility that Apple will change their mind about enforcing this in 14.4. A lot of IT people are very unhappy about this. But I wouldn't count on it, of course.

lwouis commented 5 months ago

Thank you for sharing these resources!

Let's wait for the beta to end, and let's see if we have to adapt the app or not. Hopefully they backpedal on this idea 🙏

tails618 commented 1 month ago

I see a similar but differently worded prompt on macOS 15.0 Sequoia; I can't reproduce it at the moment but I've seen it a number of times. I suspect it's the same issue and Apple modified the prompt slightly, but I'll try to remember to post a screenshot next time I see it.

tails618 commented 1 month ago
image

I get this on macOS startup, and sometimes upon just opening my laptop.

bedesv commented 3 weeks ago

@tails618 I'm having the same issue on Sequoia. I get about 3-5 popups every time I open my laptop and it's very annoying having to close them all.

tails618 commented 3 weeks ago

I get about 3-5 popups every time I open my laptop

Yup, same. 3-5 prompts. Not every time I open my laptop, though. It happens every time I boot up, and sometimes waking from sleep.

enzofrnt commented 2 weeks ago

Same issue here.

ejbills commented 2 weeks ago

Hi there, there is now some official word from Apple which at least acknowledges the popup's existence. See: https://developer.apple.com/documentation/macos-release-notes/macos-15-release-notes#ScreenCaptureKit

Applications utilizing deprecated APIs for content capture such as CGDisplayStream & CGWindowListCreateImage can trigger system alerts indicating they might be able to collect detailed information about the user. Developers need to migrate to ScreenCaptureKit and SCContentSharingPicker. (120910350)

Looks like there is no option BUT to transition to 100% ScreenCaptureKit, which for listing windows of running applications is restricted to the current-desktop space only. This is obviously a huge PITA and will have major ramifications for AltTab, I would imagine.

Either way, I tested screen capturing in my own application without using any CoreGraphics, only using ScreenCaptureKit - and I STILL get the popup message. That must be a bug.

lwouis commented 1 week ago

Apple reverted this change in macOS 14. They seem to be pushing it again in the macOS 15 beta. Closing this ticket in favor of the relevant https://github.com/lwouis/alt-tab-macos/issues/3477