diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2013-10-08 14:55:28 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-09 13:52:58 +0200 |
commit | 80cd06fd9d26aa7df02f71e001b449d65bb5b7a3 (patch) | |
tree | 240ef609bab7f481e7b86cd6ad625b457de38c28 /src/plugins/platforms/eglfs/qeglfsscreen.cpp | |
parent | 8d2c6206fdf564aa75680f4fea58e31d26a3d6dd (diff) |
eglfs: Separate compositor and improve raster window support
Separating the compositor into a separate source file improves the
chances of possible future reuse and paves the way to supporting
multiple GL windows. Tooltips are now working too. Implemented a few
window functions like raise() and lower(). Fixed the qFatal for
multiple GL windows to be raised in non-SDK based Android builds too.
Change-Id: Id94d2fb2a4382766f3d130eebe1e6f397a535852
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfsscreen.cpp')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsscreen.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsscreen.cpp b/src/plugins/platforms/eglfs/qeglfsscreen.cpp index 62f764b392..bd3601bf06 100644 --- a/src/plugins/platforms/eglfs/qeglfsscreen.cpp +++ b/src/plugins/platforms/eglfs/qeglfsscreen.cpp @@ -47,9 +47,10 @@ QT_BEGIN_NAMESPACE QEglFSScreen::QEglFSScreen(EGLDisplay dpy) - : m_dpy(dpy) - , m_surface(EGL_NO_SURFACE) - , m_cursor(0) + : m_dpy(dpy), + m_surface(EGL_NO_SURFACE), + m_cursor(0), + m_rootContext(0) { #ifdef QEGL_EXTRA_DEBUG qWarning("QEglScreen %p\n", this); @@ -121,10 +122,23 @@ void QEglFSScreen::removeWindow(QEglFSWindow *window) m_windows.removeOne(window); } +void QEglFSScreen::moveToTop(QEglFSWindow *window) +{ + m_windows.removeOne(window); + m_windows.append(window); +} + +void QEglFSScreen::changeWindowIndex(QEglFSWindow *window, int newIdx) +{ + int idx = m_windows.indexOf(window); + if (idx != -1 && idx != newIdx) + m_windows.move(idx, newIdx); +} + QEglFSWindow *QEglFSScreen::rootWindow() { Q_FOREACH (QEglFSWindow *window, m_windows) { - if (window->isRasterRoot()) + if (window->hasNativeWindow()) return window; } return 0; |