Compare commits

...

1 Commits

Author SHA1 Message Date
5bc7d7cf06 hide by default 2024-06-01 22:37:18 +03:00

View File

@@ -38,6 +38,7 @@ VirtualKeyboard::VirtualKeyboard(QWidget * parent): QWidget(parent) {
layout->applyHints(imh);
watched->installEventFilter(this);
});
hide();
}
@@ -134,11 +135,12 @@ void VirtualKeyboard::setKeyboardVisible(bool yes) {
if (yes) {
stopIndexedTimer(0);
setVisible(true);
} else startIndexedTimer(0, 10_Hz, [this]{
if (QApplication::mouseButtons() != 0) return;
stopIndexedTimer(0);
setVisible(false);
});
} else
startIndexedTimer(0, 10_Hz, [this] {
if (QApplication::mouseButtons() != 0) return;
stopIndexedTimer(0);
setVisible(false);
});
}