Home GnuPG

Qt: Implement repeat and improve grabbing
04115b3289dcUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Qt: Implement repeat and improve grabbing

The keyboard is now only grabbed if an edit has input focus.

  • qt/main.cpp (qt_cmd_handler): Parse repeat values. Set repeat_okay.
  • qt/pinentrydialog.cpp (PinentryDialog::PinentryDialog): Update layout. Add repeat label and edit. Connect focusChanged. (PinEntryDialog::hideEvent): Remove grabbing hack. (PinEntryDialog::focusChanged): New. Properly handle grabbing. (PinEntryDialog::checkRepeat): New. Enable Ok if repeat matches. (PinEntryDialog::repeatedPin): New. Getter for repeated pin. (PinEntryDialog::setRepeatErrorText): Setter for error.
  • qt/pinentrydialog.h: Update accordingly.

Adding repeat mode made it neccessary to fix the grabbing
which globally grabbed the keyboard for the line edit
as long as the window was shown.

Now we only grab when a line edit has focus. This has the
advantage that you can still work with other windows while
pinentry is open but not focused.

The new grabbing should improve security a bit as it reduces
the need for a global no-grab setting. I've verified with xev
that keyboard grabbing still works when one of the lineedits
in pinentry has focus.

Details

Provenance
aheineckeAuthored on Apr 14 2016, 12:00 PM
Parents
rPc6b43bd14718: Qt: Respect icon themes and only fallback to own
Branches
Unknown
Tags
Unknown