diff options
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index b6dd4d27..15e6fa1b 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1573,4 +1573,17 @@ void CCompositor::closeWindow(CWindow* pWindow) { focusWindow(windowFromCursor()); } } +} + +SLayerSurface* CCompositor::getLayerSurfaceFromSurface(wlr_surface* pSurface) { + for (auto& m : m_vMonitors) { + for (auto& lsl : m->m_aLayerSurfaceLists) { + for (auto& ls : lsl) { + if (ls->layerSurface && ls->layerSurface->surface == pSurface) + return ls.get(); + } + } + } + + return nullptr; }
\ No newline at end of file |
