input_common: Release mouse buttons on out of focus

This commit is contained in:
german77 2021-05-02 18:59:02 -05:00
parent 887972a91b
commit 1562858963
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) {