macOS 10.15 new permission prompts


#1

Has anyone tried their SDL programs on macOS 10.15 beta and did it ask you for permissions? I tried with the SDL2 version of my program Photosounder and it gives me this: https://i.imgur.com/aiFrALW.png

The SDL 1.2 version of my program doesn’t seem to require that. Is anybody else getting this too and is there a way to suppress this? It’s inconvenient and I don’t want people to think I log their keystrokes. Maybe it’s relevant that I use SDL_GetGlobalMouseState()?

For context macOS 10.15’s Gatekeeper is changing to ask for permissions, see https://securityboulevard.com/2019/06/7-big-security-surprises-coming-to-macos-10-15-catalina/ at #5


#2

SDL has some code to do more thorough detection of capslock presses (via Apple’s IOHIDManager APIs) than what the higher level Apple keyboard APIs provide. I wonder if that’s what’s causing it? If so, it should be fairly simple to disable that code in newer macOS versions I think?

That said, I haven’t tried 10.15 myself nor have I looked at that IOHIDManager code too closely, so I could be way off-base.


#3

I’m looking into this. It might be the event tap, too, but that’s only looking at mouse input. I’ll know more soon.


#4

Looks like the event tap is disabled by default (you need to manually define SDL_MAC_NO_SANDBOX when building SDL to get it, which we don’t anywhere).

It’s definitely the capslock code that triggers this notification; it goes away if I comment it out.

Is there any reason we can’t just use -[NSResponder flagsChanged] for this instead of IOKit? Apple docs suggest that’ll work:

https://developer.apple.com/library/archive/qa/qa1519/_index.html

Maybe this goes out of sync if the keyboard focus changes?


#5

Pushed a fix to this:


#6

Will this get in the ‘final’ 2.0.10?


#7

Thanks, seems to work for me.


#8

Will this get in the ‘final’ 2.0.10?

Yes.