Remove screen change detection since it breaks make changing screen. (Still need to test windows)
This commit is contained in:
parent
5d97e44279
commit
6fff8e3921
2 changed files with 1 additions and 19 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue