input_common: Release mouse buttons on out of focus

This commit is contained in:
german77
2021-05-02 18:59:02 -05:00
parent c17a59b58e
commit 6e81473574
3 changed files with 18 additions and 1 deletions

View File

@ -539,6 +539,8 @@ bool GRenderWindow::event(QEvent* event) {
void GRenderWindow::focusOutEvent(QFocusEvent* event) {
QWidget::focusOutEvent(event);
input_subsystem->GetKeyboard()->ReleaseAllKeys();
input_subsystem->GetMouse()->ReleaseAllButtons();
this->TouchReleased(0);
}
void GRenderWindow::resizeEvent(QResizeEvent* event) {