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)
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