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>
bb10
Alexey Chernov 2013-07-30 00:06:24 +04:00 committed by The Qt Project
parent c98943b4cd
commit 071c48a5ff
2 changed files with 2 additions and 5 deletions

View File

@ -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

View File

@ -73,7 +73,6 @@ protected:
EGLNativeWindowType m_window;
private:
WId m_winid;
EGLConfig m_config;
QSurfaceFormat m_format;
bool has_window;