mirror of
https://github.com/FelixKratz/SketchyBar
synced 2024-11-23 03:43:02 +00:00
add screen recording permission error message (#237)
This commit is contained in:
parent
4a06653683
commit
4da74adf6c
1 changed files with 9 additions and 1 deletions
10
src/alias.c
10
src/alias.c
|
@ -2,7 +2,15 @@
|
|||
|
||||
void print_all_menu_items(FILE* rsp) {
|
||||
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
|
||||
if (__builtin_available(macOS 11.0, *)) CGRequestScreenCaptureAccess();
|
||||
if (__builtin_available(macOS 11.0, *)) {
|
||||
if (!CGRequestScreenCaptureAccess()) {
|
||||
respond(rsp, "[!] Query (default_menu_items): Screen Recording "
|
||||
"Permissions not given. Restart SketchyBar after granting "
|
||||
"permissions.\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
CFArrayRef window_list = CGWindowListCopyWindowInfo(kCGWindowListOptionAll,
|
||||
kCGNullWindowID );
|
||||
|
|
Loading…
Reference in a new issue