Remove screen change detection since it breaks make changing screen. (Still need to test windows)

This commit is contained in:
James Rowe 2019-09-18 10:40:48 -06:00
parent 5d97e44279
commit 6fff8e3921
2 changed files with 1 additions and 19 deletions

View file

@ -144,8 +144,7 @@ QByteArray GRenderWindow::saveGeometry() {
}
qreal GRenderWindow::windowPixelRatio() const {
// QOpenGLWidget isn't backed by a native window, so we need to use the top level window instead
return QApplication::activeWindow()->devicePixelRatio();
return devicePixelRatio();
}
std::pair<u32, u32> GRenderWindow::ScaleTouch(const QPointF pos) const {
@ -250,7 +249,6 @@ void GRenderWindow::focusOutEvent(QFocusEvent* event) {
void GRenderWindow::resizeEvent(QResizeEvent* event) {
QOpenGLWidget::resizeEvent(event);
NotifyClientAreaSizeChanged(std::make_pair(event->size().width(), event->size().height()));
OnFramebufferSizeChanged();
}
@ -298,10 +296,6 @@ void GRenderWindow::paintGL() {
void GRenderWindow::showEvent(QShowEvent* event) {
QWidget::showEvent(event);
// windowHandle() is not initialized until the Window is shown, so we connect it here.
connect(windowHandle(), &QWindow::screenChanged, this, &GRenderWindow::OnFramebufferSizeChanged,
Qt::UniqueConnection);
}
std::unique_ptr<Frontend::GraphicsContext> GRenderWindow::CreateSharedContext() const {