mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-18 14:55:49 -04:00
Merge 2a18b84b0591cd2c6a3bc4b1e60c20c9ec8a9c51 into af2479da8dc0ff0c7104c4ccde1715b1c562dfdc
This commit is contained in:
commit
3f43312f0f
@ -231,7 +231,7 @@ bool PasswordWidget::eventFilter(QObject* watched, QEvent* event)
|
||||
if (isVisible() && (type == QEvent::KeyPress || type == QEvent::KeyRelease || type == QEvent::FocusIn)) {
|
||||
checkCapslockState();
|
||||
}
|
||||
if (type == QEvent::FocusIn || type == QEvent::FocusOut) {
|
||||
if (type == QEvent::FocusIn || type == QEvent::FocusOut || type == QEvent::Hide) {
|
||||
osUtils->setUserInputProtection(type == QEvent::FocusIn);
|
||||
}
|
||||
}
|
||||
|
@ -152,11 +152,18 @@ bool MacUtils::isCapslockEnabled()
|
||||
|
||||
void MacUtils::setUserInputProtection(bool enable)
|
||||
{
|
||||
static bool secureInputEnabled = false;
|
||||
if (enable) {
|
||||
// Always keep the internal counter set to 1
|
||||
if (secureInputEnabled) {
|
||||
DisableSecureEventInput();
|
||||
}
|
||||
EnableSecureEventInput();
|
||||
} else {
|
||||
DisableSecureEventInput();
|
||||
}
|
||||
// Store our last known state
|
||||
secureInputEnabled = enable;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user