diff options
author | Alexey Chernov <4ernov@gmail.com> | 2013-07-30 00:06:24 +0400 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-09 13:38:14 +0200 |
commit | 071c48a5ff8842d43fcdc95db08b561d340a2bfd (patch) | |
tree | d63ff1d0c79469d39770b8bdb7044289c46a8e68 /src | |
parent | c98943b4cd1c2c2007a9be19a0cfbe8739ab8ccb (diff) |
Return EGLNativeWindowType instead of window number in winId()
QEglFSWindow::winId() method was changed to return EGLNativeWindowType
EGL window handle instead of static window number as it recommends in
documentation.
QPlatformWindow documentation reads: "The platform
specific window handle can be retrieved by the winId function." and
also for winId() method itself: "Reimplement in subclasses to return
a handle to the native window".
Task-number: QTBUG-32564
Change-Id: I634c5b4d966b6aebde72518a2c39717d1b39af08
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfswindow.cpp | 6 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfswindow.h | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp index 3b0c7de8e7..28ce8c8a33 100644 --- a/src/plugins/platforms/eglfs/qeglfswindow.cpp +++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp @@ -55,10 +55,8 @@ QEglFSWindow::QEglFSWindow(QWindow *w) , m_window(0) , has_window(false) { - static int serialNo = 0; - m_winid = ++serialNo; #ifdef QEGL_EXTRA_DEBUG - qWarning("QEglWindow %p: %p 0x%x\n", this, w, uint(m_winid)); + qWarning("QEglWindow %p: %p 0x%x\n", this, w, uint(m_window)); #endif w->setSurfaceType(QSurface::OpenGLSurface); } @@ -144,7 +142,7 @@ void QEglFSWindow::setWindowState(Qt::WindowState) WId QEglFSWindow::winId() const { - return m_winid; + return WId(m_window); } QSurfaceFormat QEglFSWindow::format() const diff --git a/src/plugins/platforms/eglfs/qeglfswindow.h b/src/plugins/platforms/eglfs/qeglfswindow.h index a119c9f815..0997f80e74 100644 --- a/src/plugins/platforms/eglfs/qeglfswindow.h +++ b/src/plugins/platforms/eglfs/qeglfswindow.h @@ -73,7 +73,6 @@ protected: EGLNativeWindowType m_window; private: - WId m_winid; EGLConfig m_config; QSurfaceFormat m_format; bool has_window; |