mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-15 16:39:43 -05:00
Fix Auto-Type Empty Window Behavior
* Fixes #9282 * Also improve documentation for window title matching behavior
This commit is contained in:
parent
6130a64be5
commit
ebf0676661
4 changed files with 38 additions and 2 deletions
|
|
@ -334,12 +334,15 @@ QList<QString> Entry::autoTypeSequences(const QString& windowTitle) const
|
|||
};
|
||||
|
||||
QList<QString> sequenceList;
|
||||
QList<QString> emptyWindowSequences;
|
||||
|
||||
// Add window association matches
|
||||
const auto assocList = autoTypeAssociations()->getAll();
|
||||
for (const auto& assoc : assocList) {
|
||||
auto window = resolveMultiplePlaceholders(assoc.window);
|
||||
if (!assoc.window.isEmpty() && windowMatches(window)) {
|
||||
if (assoc.window.isEmpty()) {
|
||||
emptyWindowSequences << assoc.sequence;
|
||||
} else if (windowMatches(window)) {
|
||||
if (!assoc.sequence.isEmpty()) {
|
||||
sequenceList << assoc.sequence;
|
||||
} else {
|
||||
|
|
@ -358,6 +361,11 @@ QList<QString> Entry::autoTypeSequences(const QString& windowTitle) const
|
|||
sequenceList << effectiveAutoTypeSequence();
|
||||
}
|
||||
|
||||
// If any associations were made, include the empty window associations
|
||||
if (!sequenceList.isEmpty()) {
|
||||
sequenceList.append(emptyWindowSequences);
|
||||
}
|
||||
|
||||
return sequenceList;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue