diff options
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfswindow.cpp')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfswindow.cpp | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp index 24b17b75e7..a6115cc829 100644 --- a/src/plugins/platforms/eglfs/qeglfswindow.cpp +++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp @@ -45,25 +45,26 @@ QT_BEGIN_NAMESPACE -QEglFSWindow::QEglFSWindow(QWidget *w, QEglFSScreen *screen) - : QPlatformWindow(w), m_screen(screen) +QEglFSWindow::QEglFSWindow(QWindow *w) + : QPlatformWindow(w) { static int serialNo = 0; m_winid = ++serialNo; #ifdef QEGL_EXTRA_DEBUG - qWarning("QEglWindow %p: %p %p 0x%x\n", this, w, screen, uint(m_winid)); + qWarning("QEglWindow %p: %p 0x%x\n", this, w, uint(m_winid)); #endif -} + QRect screenGeometry(screen()->availableGeometry()); + if (w->geometry() != screenGeometry) { + QWindowSystemInterface::handleGeometryChange(w, screenGeometry); + } +} void QEglFSWindow::setGeometry(const QRect &) { // We only support full-screen windows - QRect rect(m_screen->availableGeometry()); - QWindowSystemInterface::handleGeometryChange(this->widget(), rect); - - // Since toplevels are fullscreen, propegate the screen size back to the widget - widget()->setGeometry(rect); + QRect rect(screen()->availableGeometry()); + QWindowSystemInterface::handleGeometryChange(window(), rect); QPlatformWindow::setGeometry(rect); } @@ -73,15 +74,4 @@ WId QEglFSWindow::winId() const return m_winid; } - - -QPlatformGLContext *QEglFSWindow::glContext() const -{ -#ifdef QEGL_EXTRA_DEBUG - qWarning("QEglWindow::glContext %p\n", m_screen->platformContext()); -#endif - Q_ASSERT(m_screen); - return m_screen->platformContext(); -} - QT_END_NAMESPACE |