gnome3: Fall back to curses if screensaver is locked.
* gnome3/pinentry-gnome3.c (pe_gnome_screen_locked): New Function. Returns true only if we can talk to a GNOME screensaver over D-Bus and it assures us that it is locked. (main): If GNOME screensaver is locked, fall back to curses.
We assume that if pinentry is triggered while the screensaver is
locked, then it is likely being done by some sort of remote connection
(e.g. ssh), and isn't being done directly from the graphical console.
In that case, prompting at the graphical console won't be able to get
the attention of the user, so we should fall back to curses if
possible.
- GnuPG-bug-id: T2818