swift-project / pilotclient

Cross-platform cross-simulator pilot client for virtual air traffic networks
https://swift-project.org
GNU General Public License v3.0
91 stars 26 forks source link

Show warning if Input Monitoring is not allowed #239

Closed ltoenning closed 7 months ago

ltoenning commented 7 months ago

Related to #125

With this PR, an additional error message is logged/shown if the Input Monitoring permission is not granted on macOS. A message about this is already emitted when requesting the permission, but this happens before the UI is initialized and will therefore not be displayed to the user (except in the terminal and log file).

@oktal3700 Any idea on how we could avoid logging this twice? The keyboard initialization happens in the CInputManager which again is initialized by CApplication which AFAIK should be UI independent. In the future maybe some mechanism should be added to show error messages in the early initialization phase.