Skip to content
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

Sequoia and ScreenCapture #3662

Open
asmagill opened this issue Aug 8, 2024 · 6 comments
Open

Sequoia and ScreenCapture #3662

asmagill opened this issue Aug 8, 2024 · 6 comments

Comments

@asmagill
Copy link
Member

asmagill commented Aug 8, 2024

@cmsj, @latenitefilms

Haven't had a chance to dig into this yet, but saw this come through in an yabai issue... does this affect us? I seem to recall some previous issues about needing screen capture permissions, but would have to dig a bit, so checking to see if you recall or know off hand.

https://developer.apple.com/documentation/macos-release-notes/macos-15-release-notes#ScreenCaptureKit

@cmsj
Copy link
Member

cmsj commented Aug 8, 2024

hmm, do we use any of the old screen capture APIs?

@asmagill
Copy link
Member Author

asmagill commented Aug 8, 2024

A quick check of the specific functions they mention show:

hammerspoon:%0:% ack CGWindowListCreateImage 
Hammerspoon/HSuicore.m:615:    CGImageRef windowImage = CGWindowListCreateImage(windowRect, kCGWindowListOptionIncludingWindow, windowID, kCGWindowImageBoundsIgnoreFraming | makeOpaque);

hammerspoon:%0:% ack CGDisplayStream
Hammerspoon/MJLua.m:363:        CGDisplayStreamRef stream = CGDisplayStreamCreate(CGMainDisplayID(), 1, 1, kCVPixelFormatType_32BGRA, nil, ^(CGDisplayStreamFrameStatus status, uint64_t displayTime, IOSurfaceRef frameSurface, CGDisplayStreamUpdateRef updateRef) {

So we at least need to learn more and find out if/how we might be affected.

@cmsj
Copy link
Member

cmsj commented Aug 8, 2024

Oh, right, we do have window snapshotting. Good spoit

@cmsj
Copy link
Member

cmsj commented Aug 9, 2024

I had a look at the ScreenCaptureKit API and we are going to have to replace our existing API - everything in SCKit is async, so we will have to adopt a callback setup, which is potentially going to be quite disruptive, unfortunately.

@latenitefilms
Copy link
Contributor

I believe you already get prompted for screen recording permission to use hs.window, etc. so not sure this changed anything in short term until the APIs are removed.

Maybe all the async stuff we do as v2 in Swift?

@koekeishiya
Copy link

Editor’s note: Updated to remove paragraph that said there was an API developers could adopt to avoid this pop-up. There is no API to avoid this pop-up.

Source: https://9to5mac.com/2024/08/06/macos-sequoia-screen-recording-privacy-prompt/


Apparently there will be a permission prompt weekly for these applications, if nothing changes from beta til release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants