diff options
Diffstat (limited to 'src/compositor/wayland_wrapper/qwlsurface.cpp')
-rw-r--r-- | src/compositor/wayland_wrapper/qwlsurface.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/compositor/wayland_wrapper/qwlsurface.cpp b/src/compositor/wayland_wrapper/qwlsurface.cpp index 9b3789087..a1c05d1ef 100644 --- a/src/compositor/wayland_wrapper/qwlsurface.cpp +++ b/src/compositor/wayland_wrapper/qwlsurface.cpp @@ -276,6 +276,21 @@ SubSurface *Surface::subSurface() const return m_subSurface; } +void Surface::addSubSurface(SubSurface *ss) +{ + m_subsurfaces << ss; +} + +void Surface::removeSubSurface(SubSurface *ss) +{ + for (QVector<SubSurface *>::iterator i = m_subsurfaces.begin(); i != m_subsurfaces.end(); ++i) { + if (*i == ss) { + m_subsurfaces.erase(i); + return; + } + } +} + void Surface::setInputPanelSurface(InputPanelSurface *inputPanelSurface) { m_inputPanelSurface = inputPanelSurface; @@ -506,6 +521,9 @@ void Surface::surface_commit(Resource *) m_pending.newlyAttached = false; m_pending.damage = QRegion(); + foreach (SubSurface *ss, m_subsurfaces) + ss->parentCommit(); + if (m_buffer) m_buffer->setCommitted(); |