From e5994706ebe443bc1c6249c887ec378ad5eec567 Mon Sep 17 00:00:00 2001 From: spycrab Date: Mon, 29 Jan 2018 18:35:33 +0100 Subject: [PATCH] Qt/RenderWidget: Avoid flickering --- Source/Core/DolphinQt2/RenderWidget.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/DolphinQt2/RenderWidget.cpp b/Source/Core/DolphinQt2/RenderWidget.cpp index bbeace4e2a..dd284c4862 100644 --- a/Source/Core/DolphinQt2/RenderWidget.cpp +++ b/Source/Core/DolphinQt2/RenderWidget.cpp @@ -58,6 +58,12 @@ bool RenderWidget::event(QEvent* event) QKeyEvent* ke = static_cast(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: