Home GnuPG

qt: Add support for Caps Lock hint on Wayland

Description

qt: Add support for Caps Lock hint on Wayland

* configure.ac: Check for KF5WaylandClient. Add "-fpic" to CFLAGS.
Define PINENTRY_QT_WAYLAND if pinentry-qt should use KF5WaylandClient.
* qt/Makefile.am (BUILT_SOURCES, CLEANFILES, nodist_pinentry_qt_SOURCES):
Add capslock.moc.
(pinentry_qt_SOURCES): Add capslock.cpp.
* qt/capslock.cpp: New.
* qt/capslock.h (class CapsLockWatcher): New.
* qt/capslock_p.h: New.
* qt/capslock_unix.cpp (watchingWayland): New static.
(capsLockState): Log hint for using CapsLockWatcher on Wayland.
(CapsLockWatcher::Private::*): New.
* qt/pinentrydialog.cpp: Include config.h.
(PinEntryDialog::PinEntryDialog): Set up CapsLockWatcher.

This adds support for showing a warning if Caps Lock is on on Wayland.
Support for Wayland is optional when building pinentry depending on the
availability of the KF5WaylandClient library.

Details

Provenance
ikloeckerAuthored on Jul 26 2021, 3:24 PM
Parents
rPa074c90c78a6: qt: Differentiate unknown Caps Lock state from off state
Branches
Unknown
Tags
Unknown
Tasks
T4950: pinentry: Add warning when capslock is on