C3: Fix keyboard buttons on the right getting stuck in pressed state (#22050)

* fix keyboard state stuck

* remove popup flag

* update in time
old-commit-hash: 5fea367fc9
commatwo_master
Dean Lee 4 years ago committed by GitHub
parent 50ea63cb76
commit 36839399f2
  1. 1
      selfdrive/ui/qt/widgets/input.cc
  2. 3
      selfdrive/ui/qt/widgets/keyboard.cc

@ -12,7 +12,6 @@ QDialogBase::QDialogBase(QWidget *parent) : QDialog(parent) {
Q_ASSERT(parent != nullptr);
parent->installEventFilter(this);
setWindowFlags(Qt::Popup);
setStyleSheet(R"(
* {
outline: none;

@ -31,6 +31,9 @@ bool KeyButton::event(QEvent *event) {
QMouseEvent mouseEvent(mouseType, touchEvent->touchPoints().front().pos(), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
QPushButton::event(&mouseEvent);
event->accept();
if (mouseType == QEvent::MouseButtonRelease) {
parentWidget()->update();
}
return true;
}
}

Loading…
Cancel
Save