mirror of https://github.com/mgba-emu/mgba.git
Qt: Force redraw when window gets focus
This commit is contained in:
parent
071fe7ff2d
commit
d4721cb30d
|
@ -441,6 +441,10 @@ void Window::closeEvent(QCloseEvent* event) {
|
||||||
QMainWindow::closeEvent(event);
|
QMainWindow::closeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Window::focusInEvent(QFocusEvent*) {
|
||||||
|
m_display->forceDraw();
|
||||||
|
}
|
||||||
|
|
||||||
void Window::focusOutEvent(QFocusEvent*) {
|
void Window::focusOutEvent(QFocusEvent*) {
|
||||||
m_controller->setTurbo(false, false);
|
m_controller->setTurbo(false, false);
|
||||||
m_controller->stopRewinding();
|
m_controller->stopRewinding();
|
||||||
|
|
|
@ -105,6 +105,7 @@ protected:
|
||||||
virtual void keyReleaseEvent(QKeyEvent* event) override;
|
virtual void keyReleaseEvent(QKeyEvent* event) override;
|
||||||
virtual void resizeEvent(QResizeEvent*) override;
|
virtual void resizeEvent(QResizeEvent*) override;
|
||||||
virtual void closeEvent(QCloseEvent*) override;
|
virtual void closeEvent(QCloseEvent*) override;
|
||||||
|
virtual void focusInEvent(QFocusEvent*) override;
|
||||||
virtual void focusOutEvent(QFocusEvent*) override;
|
virtual void focusOutEvent(QFocusEvent*) override;
|
||||||
virtual void dragEnterEvent(QDragEnterEvent*) override;
|
virtual void dragEnterEvent(QDragEnterEvent*) override;
|
||||||
virtual void dropEvent(QDropEvent*) override;
|
virtual void dropEvent(QDropEvent*) override;
|
||||||
|
|
Loading…
Reference in New Issue