Make sure we pick the same config for the context and window surface,
and do not create unnecessary window surfaces for the desktop widget.
Change-Id: I3c8fb3df9ab8a658196e41dfa1705cfca625a2d7
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
, m_texture(0)
, m_program(0)
{
- m_context->setFormat(window->format());
+ m_context->setFormat(window->requestedFormat());
m_context->setScreen(window->screen());
m_context->create();
}
QPlatformCursor *cursor() const;
- QPlatformOpenGLContext *platformContext() const;
-
EGLDisplay display() const { return m_dpy; }
private:
void QEglFSWindow::create()
{
- Q_ASSERT(!m_window);
+ if (m_window)
+ return;
+
+ if (window()->windowType() == Qt::Desktop) {
+ QRect rect(QPoint(), hooks->screenSize());
+ QPlatformWindow::setGeometry(rect);
+ QWindowSystemInterface::handleGeometryChange(window(), rect);
+ return;
+ }
EGLDisplay display = (static_cast<QEglFSScreen *>(window()->screen()->handle()))->display();
QSurfaceFormat platformFormat = hooks->surfaceFormatFor(window()->requestedFormat());