Merge pull request #6342 from spycrab/qt_rw_flicker

Qt/RenderWidget: Avoid flickering
This commit is contained in:
Stenzek 2018-01-31 12:43:19 +10:00 committed by GitHub
commit 987bec2fd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -58,6 +58,12 @@ bool RenderWidget::event(QEvent* event)
QKeyEvent* ke = static_cast<QKeyEvent*>(event);
if (ke->key() == Qt::Key_Escape)
emit EscapePressed();
// The render window might flicker on some platforms because Qt tries to change focus to a new
// element when there is none (?) Handling this event before it reaches QWidget fixes the issue.
if (ke->key() == Qt::Key_Tab)
return true;
break;
}
case QEvent::MouseMove: