summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-08-15 12:18:35 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-15 21:13:18 +0200
commit069469b468c482244c5d0c1459be32e8fbbca1eb (patch)
tree50fe6d1a4102e161fd062c53527da3061c58d29a /src/plugins
parentb5a24adb26227b47dd17b6d266d5d26ab32d5ccd (diff)
Made eglfs work with backing store based applications again.
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>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/eglfs/qeglfsbackingstore.cpp2
-rw-r--r--src/plugins/platforms/eglfs/qeglfsscreen.h2
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.cpp10
3 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
index edcf116b04..2caf1064cf 100644
--- a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp
@@ -57,7 +57,7 @@ QEglFSBackingStore::QEglFSBackingStore(QWindow *window)
, m_texture(0)
, m_program(0)
{
- m_context->setFormat(window->format());
+ m_context->setFormat(window->requestedFormat());
m_context->setScreen(window->screen());
m_context->create();
}
diff --git a/src/plugins/platforms/eglfs/qeglfsscreen.h b/src/plugins/platforms/eglfs/qeglfsscreen.h
index 518a5c6478..7632921145 100644
--- a/src/plugins/platforms/eglfs/qeglfsscreen.h
+++ b/src/plugins/platforms/eglfs/qeglfsscreen.h
@@ -65,8 +65,6 @@ public:
QPlatformCursor *cursor() const;
- QPlatformOpenGLContext *platformContext() const;
-
EGLDisplay display() const { return m_dpy; }
private:
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp
index b07fd19d1d..913e1c2e1e 100644
--- a/src/plugins/platforms/eglfs/qeglfswindow.cpp
+++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp
@@ -72,7 +72,15 @@ QEglFSWindow::~QEglFSWindow()
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());