I am attempting to pop up a window or alert on the login screen. If after the user inputs their password incorrectly X amount of times, we want to display a message. All of my attempts to display the window/alert appear behind the loginwindow.
I've tried setting the window.level to Int32.max and some other high values near that. It makes it the top most window behind the loginwindow and on top of everything else. If I go higher than that (somewhere in the Int64 range), it makes it the bottom most window behind everything else on the desktop.
I've also tried running a script to tell loginwindow to display an alert. It pops up, but still not over the loginwindow screen, and keyboard input isn't allowed (just get beeps) until the user hits "enter" to close the non-visible alert. Not to mention that it also requires a privacy approval for my process to access loginwindow by the user beforehand.
I've also tried setting the lock message by writing to the defaults.
But, haven't been able to get loginwindow to reload/re-read the defaults value once it is already being displayed. Is that even possible?
Any other suggestions?
I've tried setting the window.level to Int32.max and some other high values near that. It makes it the top most window behind the loginwindow and on top of everything else. If I go higher than that (somewhere in the Int64 range), it makes it the bottom most window behind everything else on the desktop.
I've also tried running a script to tell loginwindow to display an alert. It pops up, but still not over the loginwindow screen, and keyboard input isn't allowed (just get beeps) until the user hits "enter" to close the non-visible alert. Not to mention that it also requires a privacy approval for my process to access loginwindow by the user beforehand.
I've also tried setting the lock message by writing to the defaults.
Code Block sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "My login window message"
But, haven't been able to get loginwindow to reload/re-read the defaults value once it is already being displayed. Is that even possible?
Any other suggestions?