Handle window state changes correctly in EGLFS
authorDonald Carr <donald.carr@nokia.com>
Mon, 16 Apr 2012 20:19:12 +0000 (20:19 +0000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 16 Apr 2012 20:33:43 +0000 (22:33 +0200)
The only valid state for EGLFS is fullscreen; this change reduces EGLFS to
reflect this cruel reality

Change-Id: I5aa9b4ef88451a00ce9de328add7d5512e1c86b5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/plugins/platforms/eglfs/qeglfswindow.cpp
src/plugins/platforms/eglfs/qeglfswindow.h

index f380542..e9430ea 100644 (file)
@@ -54,10 +54,7 @@ QEglFSWindow::QEglFSWindow(QWindow *w)
     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);
-    }
+    setWindowState(Qt::WindowFullScreen);
 }
 
 void QEglFSWindow::setGeometry(const QRect &)
@@ -69,6 +66,12 @@ void QEglFSWindow::setGeometry(const QRect &)
     QPlatformWindow::setGeometry(rect);
 }
 
+Qt::WindowState QEglFSWindow::setWindowState(Qt::WindowState state)
+{
+    setGeometry(QRect());
+    return Qt::WindowFullScreen;
+}
+
 WId QEglFSWindow::winId() const
 {
     return m_winid;
index 1376708..7f40c78 100644 (file)
@@ -56,6 +56,7 @@ public:
     QEglFSWindow(QWindow *w);
 
     void setGeometry(const QRect &);
+    Qt::WindowState setWindowState(Qt::WindowState state);
     WId winId() const;
 
 private: