GlobalShortcuts + Screenshot: Add optional notification for non-interactive events

Currently, portal allows both to take a screenshot, and register global shortcuts without any sort of user interaction.

While this may be desirable in some cases, going completely behind the user's back is inadvisable from a security standpoint, since even for sandboxed applications, it effectively reduces the security to old X11 standards. (obvious for screenshots, with regard to global shortcuts, an app could theoretically register every key on the keyboard as a "shortcut" and then log events)

This patch adds notifications in two places:

  • when a screenshot is taken noninteractively
  • when global shortcuts are registered

Both notifications can be optionally disabled by the user in system settings (in the usual place), to revert to previous behavior.

With regard to screenshots, see also #7 for a more sophisticated potential solution, since even one screenshot taken without consent could potentially be dangerous.

Merge request reports