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

Replace legacy code on macOS builds #11428

Merged
merged 5 commits into from
Nov 10, 2024
Merged

Conversation

FischLu
Copy link
Contributor

@FischLu FischLu commented Nov 2, 2024

fix #11288, The CGDisplayStreamCreate function has been deprecated and the current code fails to compile on macOS 15 and above. Following Apple's official recommendations, this fix replaces CGDisplayStreamCreate with ScreenCaptureKit (MacOS 12.3+). Since ScreenCaptureKit is an asynchronous framework, necessary semaphore waiting has been added to the code. This change successfully triggers the screen recording permission request dialog and allows proper use of autotype when permission is granted. The code has been tested and confirmed working on macOS 15.0.1.

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

@droidmonkey
Copy link
Member

droidmonkey commented Nov 2, 2024

Omg thank you, I really didn't want to figure this one out.

@droidmonkey droidmonkey added this to the v2.7.10 milestone Nov 2, 2024
@droidmonkey droidmonkey changed the title fix #11288 Replace legacy code on macOS builds Nov 2, 2024
@FischLu
Copy link
Contributor Author

FischLu commented Nov 4, 2024

After adding Q_UNUSED(error), the automated tests do not pass. You may check the reason.

@droidmonkey
Copy link
Member

The failures are ephermal and unrelated

@droidmonkey droidmonkey merged commit ca9b88f into keepassxreboot:develop Nov 10, 2024
11 checks passed
@TheRojam
Copy link

Thank you guys!

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

Successfully merging this pull request may close these issues.

Failed build on macOS with Xcode 16.0
4 participants