added misc:layers_hog_keyboard_focus

This commit is contained in:
vaxerski
2022-08-10 17:46:01 +02:00
parent 03f2e4d42a
commit 9eb750c00b
4 changed files with 32 additions and 4 deletions

View File

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