Remove screen change detection since it breaks make changing screen. (Still need to test windows)
This commit is contained in:
parent
5d97e44279
commit
6fff8e3921
|
@ -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 {
|
||||
|
|
|
@ -185,15 +185,6 @@ protected:
|
|||
framebuffer_layout = layout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update internal client area size with the given parameter.
|
||||
* @note EmuWindow implementations will usually use this in window resize event handlers.
|
||||
*/
|
||||
void NotifyClientAreaSizeChanged(const std::pair<unsigned, unsigned>& size) {
|
||||
client_area_width = size.first;
|
||||
client_area_height = size.second;
|
||||
}
|
||||
|
||||
private:
|
||||
/**
|
||||
* Handler called when the minimal client area was requested to be changed via SetConfig.
|
||||
|
@ -206,9 +197,6 @@ private:
|
|||
|
||||
Layout::FramebufferLayout framebuffer_layout; ///< Current framebuffer layout
|
||||
|
||||
unsigned client_area_width; ///< Current client width, should be set by window impl.
|
||||
unsigned client_area_height; ///< Current client height, should be set by window impl.
|
||||
|
||||
WindowConfig config; ///< Internal configuration (changes pending for being applied in
|
||||
/// ProcessConfigurationChanges)
|
||||
WindowConfig active_config; ///< Internal active configuration
|
||||
|
|
Reference in New Issue