Home GnuPG

qt: Show hint if Caps Lock is on

Description

qt: Show hint if Caps Lock is on

* configure.ac: Check for libX11. Define PINENTRY_QT_X11 if pinentry-qt
should use x11.
* m4/qt.m4: Check for Qt5X11Extras if libX11 is available.
* qt/Makefile.am (pinentry_qt_platform_SOURCES): New.
(pinentry_qt_SOURCES): Add pinentry_qt_platform_SOURCES.
* qt/capslock.h, qt/capslock_unix.cpp, qt/capslock_win.cpp: New.
* qt/main.cpp (qt_cmd_handler): Pass caps lock hint to the dialog.
* qt/pinentrydialog.cpp, qt/pinentrydialog.h
(PinEntryDialog::setCapsLockHint, PinEntryDialog::keyReleaseEvent,
PinEntryDialog::checkCapsLock): New.
* qt/pinentrydialog.h (PinEntryDialog): Use Q_SLOTS instead of slots.
Add field mCapsLockHint.
* qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Initialize
new field. Add new widgets to GUI. Connect to applicationStateChanged()
signal. Call checkCapsLock().

This adds support for showing a warning if Caps Lock is on. This is
supported on X11 and on Windows.

Details

Provenance
ikloeckerAuthored on Jul 21 2021, 12:03 PM
Parents
rP672260f15bf8: Add support for Caps Lock hint
Branches
Unknown
Tags
Unknown
Tasks
T4950: pinentry: Add warning when capslock is on