handle layer popups

This commit is contained in:
vaxerski
2022-03-20 12:11:57 +01:00
parent b0dffc10b7
commit 5d0919fcff
5 changed files with 136 additions and 1 deletions

View File

@@ -310,4 +310,18 @@ bool CCompositor::windowValidMapped(CWindow* pWindow) {
return false;
return true;
}
SLayerSurface* CCompositor::getLayerForPopup(SLayerPopup* pPopup) {
auto CurrentPopup = pPopup;
while (CurrentPopup->parentPopup != nullptr) {
for (auto& p : g_pCompositor->m_lLayerPopups) {
if (p.popup == CurrentPopup->parentPopup) {
CurrentPopup = &p;
break;
}
}
}
return CurrentPopup->parentSurface;
}