Qt: Force redraw when window gets focus
Jeffrey Pfau jeffrey@endrift.com
Tue, 04 Aug 2015 19:59:59 -0700
2 files changed,
5 insertions(+),
0 deletions(-)
M
src/platform/qt/Window.cpp
→
src/platform/qt/Window.cpp
@@ -441,6 +441,10 @@ saveConfig();
QMainWindow::closeEvent(event); } +void Window::focusInEvent(QFocusEvent*) { + m_display->forceDraw(); +} + void Window::focusOutEvent(QFocusEvent*) { m_controller->setTurbo(false, false); m_controller->stopRewinding();
M
src/platform/qt/Window.h
→
src/platform/qt/Window.h
@@ -105,6 +105,7 @@ virtual void keyPressEvent(QKeyEvent* event) override;
virtual void keyReleaseEvent(QKeyEvent* event) override; virtual void resizeEvent(QResizeEvent*) override; virtual void closeEvent(QCloseEvent*) override; + virtual void focusInEvent(QFocusEvent*) override; virtual void focusOutEvent(QFocusEvent*) override; virtual void dragEnterEvent(QDragEnterEvent*) override; virtual void dropEvent(QDropEvent*) override;