From 9eb750c00b576d6c1de0a80239c7085de504f72d Mon Sep 17 00:00:00 2001 From: vaxerski Date: Wed, 10 Aug 2022 17:46:01 +0200 Subject: added misc:layers_hog_keyboard_focus --- src/Compositor.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/Compositor.cpp') 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 -- cgit v1.2.3